Look ML

I do not get any error while passing a date range to ‘rev_rec_date’ in SQL runner, but getting an error ‘:invalid value for "YYYY" in source string’, when I do the same while defining a view. Attached are the shots. Please help

bf3a3f38-c08f-4031-a573-2a83d090a583.png
21d3bae1-f78d-4a97-8787-14c6ef3f6ec7.png
0 4 288
4 REPLIES 4

Hi @Tusharr_Batra 

It’s not quite clear what’s causing this error. How you looked at SQL generated after you define a view? Is it any different?

I am Union - ing this query with another while defining the view

Hi Tusharr.

Oh I had the same error message in another project hehe . It is not looker related.

In the line number #63, you will need to include “to_date” function for searching the date “2021-01-01”.

You may came from sql server where this syntax  works, but unfortunately it does not in any SQL solution.

523e53aa-85d5-49da-9c6c-55e2d94db430.png

Hope this helps!

Best regards,

Leo

Thanks for the revert @leobardor , I tried that way as well but it did not work, eventually I had to it other way by creating a table in DB

Top Labels in this Space
Top Solution Authors