on 12-18-2018 8:45 AM
Hi All,
I am trying to create a User-Defined SQL Script Library in HANA version 2.00.031.00.. Here are I am getting following error.
Could you please assist me?
Could not execute 'LIBRARY "MasterData" LANGUAGE SQLSCRIPT AS BEGIN Public variable vrowcount int'
SAP DBTech JDBC: [257]: sql syntax error: incorrect syntax near "LIBRARY": line 1 col 1 (at pos 1)
LIBRARY "MasterData"
LANGUAGE SQLSCRIPT AS
BEGIN
Public variable vrowcount int;
Public Function "prod_exists" (in ip_prod_id nvarchar(10))
Returns Res Boolean as
Begin
Declare lv_cnt int;
Select count (*) Into cnt from "CHINABBAS"."PRODUCT_DETAILS"
WHERE "PRODUCT_ID" = :ip_prod_id;
If lv_cnt > 0 THEN
Res := true;
Else
Res := false;
END IF;
End;
Public Procedure "get_prod_data" (OUT o_tb_prod "CHINABBAS"."PRODUCT_DETAILS")
LANGUAGE SQLSCRIPT
SQL Security Invoker
AS
BEGIN
o_tb_prod = Select * FROM "CHINABBAS"."PRODUCT_DETAILS";
vrowcount = record_count (:o_tb_prod);
END;
END;
The statement is not just "LIBRARY", it is "CREATE LIBRARY". Please check the examples here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can get some information from the system views mentioned here. In the DEFINITION columns of the views you can see the CREATE LIBRARY statement respectively the FUNCTION/PROCEDURE headers.
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.