Quantcast
Channel: SCN : Discussion List - SAP HANA and In-Memory Computing
Viewing all articles
Browse latest Browse all 5653

Scalar UDF accessing HANA DB

$
0
0

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;


Viewing all articles
Browse latest Browse all 5653

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>