Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI
In my QVW file having an "Test" table, in that having data from 2006 to current day date(i;e;04-07-2011).
"CapDate" is the field in my table having the data like this i.e; from "01-01-2006 12:13:15" to "04-07-2011 12:13:15"
Now when i load the "Test" table then i need to have the data of only last 12 months from current day onwards.
How can i achieve this.
Regards
Venkat
The following sample script shows how you can extract one year data from the table of data for several years. Hope this helps you write the script for your application.
LET vStartDate = Num(Date#('01/01/2006','MM/DD/YYYY'));
LET vEndDate = Num(Date#('12/31/2011','MM/DD/YYYY'));
AllData:
LOAD Date($(vStartDate) + IterNo() - 1) as Date
,Ceil(rand()*100) as Sales
AutoGenerate 1
While $(vStartDate) + IterNo() <= $(vEndDate);
RequiredData:
NoConcatenate LOAD * Resident AllData Where Date >= AddYears(Today(),-1) and Date <= Today();
DROP Table AllData;