Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Where to use where exists operation? I am confusing with this.
Please help to provide the answer with an simple example.
I tried user manual but did not understand.
Thanks in advance.
EMP:
LOAD EMPNO,
ENAME,
JOB,
MGR,
HIREDATE,
SAL,
COMM,
DEPTNO
FROM
EMP.qvd(qvd)
Where Exists(DEPTNO,10); // 1
//where exists(DEPTNO, DEPTNO);// 2
Typically you would use the Where clause to limit the Load to specific records such as in you example you only wanted to load DEPTNO that was equal to 10. So in that example you would simple write "Where DEPTNO = 10;".
However, say you have already loaded a Dimension table that contains 25 different department i.e: 1 - 25. Instead of writing "Where DEPTNO = 1 and DEPTNO = 2 and DEPTNO = 3 etc.." you can simple write Where Exists(DEPTNO) and Qlikview will look to the already loaded tables and load only those DEPTNO that exist. .
Loads only data from Emp.QVD where the field DEPTNO = 10 in a previous loaded table
The line '...exists(DEPTNO, DEPTNO)' returns a true (-1) if the value of the field DEPTNO in the current record already exists in any previously read record containing that field
hi,
Regards
Vimlesh
PFA
Thank you sagarkharpude and all