cancel
Showing results for 
Search instead for 
Did you mean: 

Varaible start date in SELECT STATEMENT issued with hdbsql on HANA 1.0 SPS 12

yvonne_haase2
Discoverer
0 Kudos

Hello,

I would like to know how I can use a variable date in a where clause of a select statement that is run in hdbsql.

I tried this:

select HOST, left(to_char(UNLOAD_TIME),10) as DAY, REASON, count(*) as "Number_of_Unloads" from M_CS_UNLOADS where UNLOAD_TIME >= '20180101' and UNLOAD_TIME < CURRENT_DATE group by HOST, left(to_char(UNLOAD_TIME),10), REASON order by DAY, HOST, REASON;

I would like to use a date variable for '20180101'.

How do I do that in hdbsql on HANA 1.0 SPS 12?

Thank you,

Yvonne

Accepted Solutions (0)

Answers (0)