Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
i want to load last one year data while loading to QVD from DB
i have a Month Field
CreatedMonth
201804
201805
201806 like that
and i have a Quarter filed like below
2018Q1
2018Q2 like so on...
Thanks
Sony
You can alter the above script.
Let vVar = Date(AddMonths(Today(),-12),'MM/DD/YYYY'); //08/09/2017
Data:
Load *
From
DB Path Where Created >= '$(vVar)';
Use this?
Table:
Load * From Table;
Store Table into ../../Store.qvd (qvd) Where Year = Year(Today());
Hi Sony,
Do you want to load the data from 201708 to till date? If so, try
Let vVar = Date(Monthend(AddMonths(Today(),-12)),'YYYYMM'); //201708
Data:
Load *
From
DB Path where CreatedMonth >= $(vVar);
yes
i want the till date to last year same day(or same quarter) so how can i do this?
If you want to load the data to last year same day, you need a date field.
i have date field created
in this format MM/DD/YYYY
You can alter the above script.
Let vVar = Date(AddMonths(Today(),-12),'MM/DD/YYYY'); //08/09/2017
Data:
Load *
From
DB Path Where Created >= '$(vVar)';
PFB the Solution Hope so it will help you.
Data:
Load *
From
DB Path
where Date>=Daystart(today(),-365) and Date<=Today();