Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am new to QlikView. I have few SQL tables and QVD's generated from it. I want to load only the specific records from the QVD's to the application using where condition SQL eg. Where department in (Select department from DD where status = 'active')
The challenge I am facing is - each QVD have millions of rows and not all rows are required into the new application - So do I need to specify where clause to all the QVD Load statements ? Can a condition (like department = 'Client Operations') once applied to the first load and then all subsequent load statements will only load the relevant records ?
Table1:
LOAD TYPE_CODE,
TYPE_NAME,
CATEGORY_NAME,
SUBCATEGORY_NAME
FROM
REF_TYPE.qvd (qvd) WHERE TYPE_CODE = 'ABC';
Table2:
LOAD SUMARY_ID,
SA_ID,
SA_LOD,
TYPE_NAME,
...
FROM
SUMMARY.qvd (qvd);
Summary QVD has millions of records and only a subset of records are required.
Please advise.
Table2:
LOAD SUMARY_ID,
SA_ID,
SA_LOD,
TYPE_NAME,
...
FROM
SUMMARY.qvd (qvd)
Where Exists (TYPE_NAME);
Table2:
LOAD SUMARY_ID,
SA_ID,
SA_LOD,
TYPE_NAME,
...
FROM
SUMMARY.qvd (qvd)
Where Exists (TYPE_NAME);
The where clause only applies to the load statement it is used in. If you want only related records from the other loads then you'll have to use Where Exists or Left Keep. It depends on the situation which will perform better. That's means you will have to test that on your particular files. See this discussion: Re: Left Keep vs Where Exists