Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
prma7799
Master III
Master III

how to fetch limited data only

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

14 Replies
Anonymous
Not applicable

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.

optimize and non-optimze load in qvd

Anonymous
Not applicable

you can use the where condition to fetch only the required data

or send us the code you are using in your qvdgeneration

buzzy996
Master II
Master II

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.

prma7799
Master III
Master III
Author

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

Anonymous
Not applicable

Can you share your data model and the current load statement ?

robert_mika
Master III
Master III

2015-06-30_123040.jpg

(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)

maxgro
MVP
MVP

load *

from a.qvd (qvd)

where datefield >= AddYears(YearStart(Today()),-1);

prma7799
Master III
Master III
Author

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.

MayilVahanan

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;

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.