Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

Output as SQL Query instead of result rows

$
0
0

Hi Experts,

 

When I execute the below query, I am getting the output as the SQL query instead of the result rows. Can anybody help me how to get the results rows .


CreateProcedureSREELATR.Parentchild (IN ZSCHEMA NVARCHAR(20),

IN TABLENAME1 NVARCHAR(200),

IN TABLENAME2 NVARCHAR(200),

IN TABLEKEY NVARCHAR(100),

OUT OUT_RESULT  NVARCHAR(2000))

LANGUAGE SQLSCRIPT AS

 

SQLQ                 NVARCHAR(5000);

BEGIN

 

EXEC 'SET SCHEMA '||:ZSCHEMA;

 

OUT_RESULT :=  'SELECT distinct '||:TABLEKEY||' from CDW_POC.'||:TABLENAME1||

           ' MINUS '

          'SELECT DISTINCT '||:TABLEKEY||' from CDW_POC.'||:TABLENAME2;

EXECUTE IMMEDIATE :OUT_RESULT;

 

END;

 

call SREELATR.PARENTCHILD('SREELATR','SALES','ORDER','SALES-ORD-KEY',?);


Viewing all articles
Browse latest Browse all 6412

Trending Articles



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