Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
DateIsland:
LOAD
date($(vMinDate) + rowno() - 1) AS D,
year($(vMinDate) + rowno() - 1) AS Y,
month($(vMinDate) + rowno() - 1) AS M,
date(monthstart($(vMinDate) + rowno() - 1), 'MMM-YYYY') AS MY
AUTOGENERATE
vMaxDate - vMinDate + 1;
Hi,
YEs the load statement can end with autogenerate statements..
ex:
Load RecNo( ) as A, rand( ) as B autogenerate(10000);
One thing i didnot understand what was the actual problem in script.
Regards
Ajay
Sintex error while compiling script.
Missing FROM
is something wrong in script????
Let vMinDate='01/01/2010';
LET vMaxDate=Date(Today(),'DD/MM/YYYY');
DateIsland:
LOAD
date($(vMinDate) + rowno() - 1) AS D,
year($(vMinDate) + rowno() - 1) AS Y,
month($(vMinDate) + rowno() - 1) AS M,
date(monthstart($(vMinDate) + rowno() - 1), 'MMM-YYYY') AS MY
AUTOGENERATE
vMaxDate - vMinDate + 1;
I tried in the above way it is executing properly..i think you are getting the error may be you didnot declare the variables vMinDate and vMax Date.
check it once..
Regards,
Ajay
Temp:
load
num(min(Date)) as MinDate,
num(max(Date)) as MaxDate
Resident
Data;
LET vMinDate = peek('MinDate',0,'Temp');
LET vMaxDate = peek('MaxDate',0,'Temp');
Drop table Temp;
DateIsland:
Load
date($(vMinDate) + rowno() -1) as D,
year($(vMinDate)) + rowno() -1) as Y,
month($(vMinDate)) + rowno() -1) as M,
date(monthstart($(vMinDate)) + rowno() -1),'MMM-YYYY') as MY
AUTOGENERATE (vMaxDate - vMindate + 1);
This is my code ...
can u pls check whats wrong in bove script
in the LET statement you use uppercase D vMinDate
in the autogenerate you refer to vMindate (lowercase d)
thanks buddy