Skip to Content
0

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

Feb 27 at 02:00 PM

15

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers