Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Is it work or not

HI every one i have to apply this thing in qlikview how i do this

EMPNO:

select a.empno,a.ename,a.job,a.mgr,a.hiredate,a.sal,a.comm,a.deptno from emp a

where a.empno in (

LOAD EMPNO

FROM

EMP.qvd

);

store EMPNO into EMPNO.qvd (qvd);

DROP table EMPNO;

got error missing right parenthesis  

4 Replies
Digvijay_Singh

Try loading EMP.qvd first, and then load your initial EMPNO: script with Exist clause to check EMPNO already exists or not.

Not applicable
Author

Thanks for the rerply but i have only one qvd which is emp.qvd and the result which the select statement return is stored into the empno qvd

In nutshell the result of  this

LOAD EMPNO

FROM

EMP.qvd

will pass to the select statement and then save into new qvd which is empno

maxgro
MVP
MVP

you cannot use a Qlik statement (load EMPNO from EMP.qvd) in a SQL statement (select ....) because the select is executed at the database side and the database doesn't know and can't execute the Qlik statement

try with a preceding load

tmp:

LOAD EMPNO

FROM

EMP.qvd

EMPNO:

load * where exists(EMPNO);

SQL

select a.empno,a.ename,a.job,a.mgr,a.hiredate,a.sal,a.comm,a.deptno from emp ;

store EMPNO into EMPNO.qvd (qvd);

DROP table EMPNO, tmp;

jonathandienst
Partner - Champion III
Partner - Champion III

If you want to avoid fetching all the empno records to filter in QV, but rather fetch only those that match you can pass the list of EMPNOs to the SQL query in a variable like this:

T1:

LOAD Concat(EMPNO, ',') As EmpNos

FROM EMP.qvd (qvd);

Let vEmpNos = Peek('EmpNos');

Drop Table T1;

SQL

select empno as EMPNO, ename, job, mgr, hiredate, sal, comm, deptno

from emp where empno in ($(vEmpNos));

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein