on 07-27-2013 5:41 PM
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;
I've been playing with this and it looks like the Scalar UDF in SP06 is very limited. It doesn't support the CHAR data type, and doesn't support any SQL functions.
I thought I could get around my problem by pushing the SQL out into a Scalar Procedure but I can't even do CALL() within the UDF.
Looks like I need to find a different way to solve my problem.
John
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi John,
I have the same problem. Please share your solution to this issue if you found it.
Joanna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.