cancel
Showing results for 
Search instead for 
Did you mean: 

declaring, initializing and selecting a parameter in HANA Studio SQL console

former_member606700
Discoverer
0 Kudos

I want to run this code on the SQL console in hana studio without creating a procedure balakumar.viswanathan2

DECLARE FromDate DATE;
SELECT TOP 1 "RefDate" INTO FromDate FROM TestTable;
SELECT FromDate FROM DUMMY;

View Entire Topic
former_member606700
Discoverer
0 Kudos

rahul.jain257 balakumar.viswanathan2 any help on the below question:

please i want to use these variable as parameters in the below procedure.

but the stored procedure is not showing any data knowing that if i execute the stored procedure with static dates it shows data CALL STORED_PROCEDURE('20190101','20191231');

DOBEGIN
DECLARE FromDate Date;
DECLARE ToDate Date;SELECTTOP1CAST("RefDate" AS DATE) INTO FromDate FROM T0;SELECTTOP1CAST("RefDate" AS DATE) INTO ToDate FROM T0 ORDER BY "RefDate" DESC;CALL STORED_PROCEDURE(:FromDate,:ToDate);END
rahuljain257
Participant
0 Kudos

Give me some time & will get back to you.