Skip to Content
0
Jan 28, 2020 at 10:50 AM

Print the result of a variable in Select statement

45 Views

Hi,

Could you help to print the result of the Parameter in Select statement in HANA.

In SQL its possible to get it and I need assistance on doing the same in HANA without using DO BEING ... END;

below is my SQL format which i need in HANA...

/* select from [dbo].[OJDT] T0 */

Declare @DateFY DATE

SET @DateFY= /* T0."RefDate" */ '[%0]';

/* select from [dbo].[OJDT] T0 */

Declare @DateY DATE

SET @DateY= /* T0."RefDate" */ '[%1]';

Select @DateFY,@DateY, Case When @DateFY<@DateY THEN 'LESSER DATE' ELSE 'GREATER DATE' END 'Result'

Would be nice if someone helps me out since I'm new to HANA learning.

Thanks

Gopi