You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi everybody,
I am trying to use ALASQL to manipulate dates. I need it to be 100% in SQL (no javascript).
For that I need to create a CTE (so I can use it in my existing query) with all the dates from 2022-01-01 to 2080-12-31.
I tried many stuff like that :
WITH myRange AS (
SELECT VALUE FROM RANGE(0, 21550)
),
calendar AS (
SELECT DATEADD(day, VALUE, '2022-01-01') AS date
FROM myRange
),
But in the calendar CTE, the VALUE is not usable.
If if do a SELECT VALUE FROM myRANGE
I have the list of value from 0 to 21550
But I can't have use it in the DATEADD
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi everybody,
I am trying to use ALASQL to manipulate dates. I need it to be 100% in SQL (no javascript).
For that I need to create a CTE (so I can use it in my existing query) with all the dates from 2022-01-01 to 2080-12-31.
I tried many stuff like that :
But in the calendar CTE, the VALUE is not usable.
If if do a
SELECT VALUE FROM myRANGE
I have the list of value from 0 to 21550
But I can't have use it in the DATEADD
Thanks a lot for your help
Beta Was this translation helpful? Give feedback.
All reactions