Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Try loading EMP.qvd first, and then load your initial EMPNO: script with Exist clause to check EMPNO already exists or not.
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
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;
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));