Skip to Content
0
Aug 17, 2018 at 07:11 PM

Return result from SQL Bloc

139 Views Last edit Aug 17, 2018 at 07:19 PM 4 rev

bloc1.jpgbloc2.jpg

Hello,

I have the following example in Hana Studio, where I would like to assign a value to a variable and then display it with an sql query. I have tried the following:

DO BEGIN

DECLARE PALLET_UOFM varchar(100);

SET 'PALLET_UOFM' = '1234';

SELECT :PALLET_UOFM AS PRINTED_PALLET_UOFM FROM DUMMY;

END;

I've also tried the following:

DO BEGIN

DECLARE PALLET_UOFM varchar(100);

SET 'PALLET_UOFM' = '1234';

SELECT PALLET_UOFM AS PRINTED_PALLET_UOFM FROM DUMMY;

END;

In both cases, it prints null. Please see tthe attachements.

Is there something missing ?

Thanks for your help.

Attachments

bloc1.jpg (36.1 kB)
bloc2.jpg (37.2 kB)