Hi,
I'm trying to create a simple scalar UDF that provides an aggregated value from a table, given an input. When I do so, I get the following error, which implies it's not possible:
SAP DBTech JDBC: [7] (at 194): feature not supported: Scalar UDF does not support TABLE operations: line 5 col 1 (at pos 194)
Is it not possible to call SQL from a UDF in SP06?
John
DROP FUNCTION test_udf;
CREATE FUNCTION test_udf (customer CHAR(16))
RETURNS quantity INT
LANGUAGE SQLSCRIPT SQL SECURITY INVOKER READS SQL DATA AS
BEGIN
quantity = select SUM(quantity) AS QTY from SALES WHERE customer = :customer;
END;