equivalent of Cross Apply with function in vertica
I have a select statement like
sub.ts AS FULL_DT,
EXTRACT(DOW FROM DATE sub.ts)+1 DAY_IN_WEEK,
EXTRACT (DAY FROM DATE sub.ts) AS DAY_IN_MONTH,
EXTRACT (DOY FROM DATE sub.ts) AS DAY_IN_YEAR
I have to perform above select to the dates which are present in another table in vertica
I mean in the above query sub.ts would get replaced by col1 from table1.
table1 has data like
For all these 4 row the above select should get executed..This can be achieved using CROSS APPLY and creating function which has the above select statement in SQL.
But please let me know how can we achieve same in VERTICA?