I need help with an error that comes after I do a select statement for a function that I created.
This is the function
CREATEFUNCTION"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.