Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have one application in that i want only current and last year data.I am using qvd generated for my application.
How can i achieve it.
Thanks
When you load from the qvd use a Where clause to only load what you wish.
A Where Exists can be even better as it can be scripted to enable an optimized load.
you can use the where condition to fetch only the required data
or send us the code you are using in your qvdgeneration
on ur load script where clause u can simple write where condition like this.
where uryearfield=Year(now())-2;
this always fetch only last 2 year data from today to back.
Thanks Bill,
But i didnt understand where i need put where clause i mean i dint understand dates in my application there is financial year and fiscal year but i am not able to get in that dates in QVD generator.
Thanks
Can you share your data model and the current load statement ?
(Excel is the initial Data)
LOAD Data,
Year(Data) as Year
FROM
t1.Qvd
(qvd)
WHERE Data>=MakeDate(Year(today())-1,1,1)
and Data<=MakeDate(Year(today()),1,1)
load *
from a.qvd (qvd)
where datefield >= AddYears(YearStart(Today()),-1);
DIVISION:
LOAD
AUTONUMBER([SG_ID] & ' _' & Date(floor(DivTarDate),'DD/MM/YYYY')) As %DIVTAR_KEY,
DivAnnual,
DivMonthly
FROM
[..\Qvds\DIVISION.qvd]
(qvd)
where DivTarDate >=Year(now())-2;
I used the above statement data is not coming properly.
Hi
DIVISION:
LOAD
AUTONUMBER([SG_ID] & ' _' & Date(floor(DivTarDate),'DD/MM/YYYY')) As %DIVTAR_KEY,
DivAnnual,
DivMonthly
FROM
[..\Qvds\DIVISION.qvd]
(qvd)
where Year(DivTarDate) <=Year(now())-2;