Skip to Content
0
May 31, 2018 at 03:53 AM

Support of CREATE OR REPLACE clause

159 Views Last edit May 31, 2018 at 03:55 AM 2 rev

Hi,

CREATE OR REPLACE Function

Although the link above shows that there is support of CREATE OR REPLACE in HANA.

But it is not working for me, can you please help in finding the problem with it ?

CREATE OR REPLACE FUNCTION "SCHEMA1"."Table_function1" () RETURNS TABLE (SOME_ID NVARCHAR(100))
LANGUAGE SQLSCRIPT
SQL SECURITY INVOKER
AS
BEGIN
RETURN SELECT SOME_ID
 FROM SCHEMA1.SOME_TABLE WHERE
STATUS_VALID IN('t', 'T', 'f', 'F', 'v');
END;

It gives the following error :

Could not execute 'CREATE OR REPLACE FUNCTION "SCHEMA1"."Table_function1" () ...'
SAP DBTech JDBC: [257]: sql syntax error: incorrect syntax near "OR": line 1 col 8 (at pos 8)
Could not execute 'END'
SAP DBTech JDBC: [257]: sql syntax error: incorrect syntax near "END": line 1 col 1 (at pos 1)

A quick response will be highly appreciated.

Thanks & Regards,

Maninder Singh