Skip to Content
avatar image
Former Member

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


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,


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers