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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need help around Exists and Not exists

Pl find below my script script content.  I want to understand where not exists(deptid) functionality here.

Does this mean, the Deptid which is there in dept11.qvd (refer below the Concatenate) is not there in Dept.xlsx then merge these data ??

Can someone pl explain on this  ? If its EXISTS what will happen ??

Inc:

LOAD Deptid as Dep,

     Deptname,

     Location,

     last_upd

FROM

$(SD)Dept.xlsx

(ooxml, embedded labels, table is Delta)

WHERE last_upd >= $(vmaxdt);

Concatenate

LOAD Deptid,

     Deptname,

     Location,

     last_upd

FROM

$(SD)dept11.qvd(qvd)

WHERE NOT EXISTS(Deptid);

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     This script says.

     First load the data from excel.

     Now load the data from QVD but only the Deptid which is not loaded earlier.

     Let me explain with example.

     Say I load Country (INDIA,US) earlier from a QVD.

     Now I need to get the country which is not (INDIA and US)

     So i will use not Exist function.

     Which says dont load the data which is loaded earlier.

     Hope this is clear.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

4 Replies
Not applicable
Author

see attached file for your help

POTENTIAL_QVD:

LOAD * INLINE [

    id,name

    1, dddk

    2,cck

];

join

POTENTIAL_EXCEL:

LOAD * INLINE [

    id,name

    1, dk

    2,cck

    3,ab

    4,cd

]Where not Exists(id);

Not applicable
Author

Attachment is missing , I guess.

Is that a word doc ??  I can't open .qvw file

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     This script says.

     First load the data from excel.

     Now load the data from QVD but only the Deptid which is not loaded earlier.

     Let me explain with example.

     Say I load Country (INDIA,US) earlier from a QVD.

     Now I need to get the country which is not (INDIA and US)

     So i will use not Exist function.

     Which says dont load the data which is loaded earlier.

     Hope this is clear.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Thanks once again Kaushik.

Thanks much Vish - I tried your sample data , now am clear..

Just to conclude:

TableA

Concatenate

TableB

Where not exists (id)

Exclude the values in B if its already there in A while joining with Table A