0

I have a very simple problem with HANA SQL but I really can't understand the solution. My target is to output the current date.

If I write the following query in HANA Studio, it output an empty cell

SELECT current_date "current date" FROM DUMMY;

enter image description here

while if I write the following, it gives the current_date as output.

SELECT DISTINCT calendar_date "current date"
from CALTABLE
where calendar_date=current_date;

Why the first and the second query give different results?

Nicolaesse
  • 2,554
  • 12
  • 46
  • 71
  • Can you add details on how you executed the query (i.e. which client, etc)? I copied your query on `dummy` and executed it. On my system it returns the expected result. – Mathias Kemeter Feb 28 '22 at 07:46
  • In addition, can you please check the result of `SELECT 'hello world' FROM dummy`. From your screenshot it seems like there is no record returned from `dummy`, which is different from an empty cell (= one record, but no data). – Mathias Kemeter Feb 28 '22 at 08:57

0 Answers0