Skip to Content
0
Former Member
May 06, 2013 at 10:59 PM

Error while creating a function in HANA

47 Views

I need help with an error that comes after I do a select statement for a function that I created.

This is the function

CREATE FUNCTION "PTIRUCHANUR"."ufnGetAllCategories"(retCategoryInformation INT)

RETURNS table (

"PARENTPRODUCTCATEGORYNAME" NVARCHAR(50) ,

"PRODUCTCATEGORYNAME" NVARCHAR(50),

"PRODUCTCATEGORYID" INTEGER

)

LANGUAGE SQLSCRIPT

SQL SECURITY INVOKER AS

-- Returns the CustomerID, first name, and last name for the specified customer.

BEGIN

RETURN Select

"PARENTPRODUCTCATEGORYNAME",

"PRODUCTCATEGORYNAME",

"PRODUCTCATEGORYID"

from"PTIRUCHANUR"."VGETALLCATEGORIES"

Select * from "PTIRUCHANUR"."ufnGetAllCategories" ('5')

where :retCategoryInformation = "PRODUCTCATEGORYID";

END;

The error that I get when I do


Select * from "PTIRUCHANUR"."ufnGetAllCategories" ('5')

is as follows

Could not execute 'Select * from "PTIRUCHANUR"."ufnGetAllCategories" ('5')' in 44 ms 838 µs . SAP DBTech JDBC: [2048]: column store error: search table error: [34092] search on calculation model requires parameters;Required variable $$retCategoryInformation$$ is not set.

Please help me with this.

Thanks.