When I run the SQL Query:
select generate_series(0,g)
from ( select date(date1) - date(date2) as g from mytable ;
It returns an error:
INFO: Function "generate_series(integer,integer)" not supported.
ERROR: Specified types or functions (one per INFO message) not supported
on Redshift tables.
But when I run this query:
select generate_series(0, g) from (select 5 as g)
It returns the below response:
generate_series
-----------------
0
1
2
3
4
5
(6 rows)
Why does the second query work, while the first fails?
interval
not aninteger
(because of: "generate_series(integer, interval) does not exist") – Siriasis