Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Join question

Hi guys,

I have one QVD file which got unique IDs....

ID

1

2

3

4

5

6

7

now i got one source table in my database with following unique Ids.

ID

4

5

6

7

I need to update my QVD file by performing a subtraction kind of operation...

so that my QVD file should have

ID

1

2

3

it is like QVD - Source.

Is it possible?

Saurabh

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi,

It is possible using EXISTS() clause in the WHERE load statement:

Source:

LOAD ID;

SQL SELECT ID FROM TABLE; //whatever the source it is

QVD: // load only interesting records

LOAD ID

FROM File.qvd (qvd)

WHERE NOT EXISTS(ID);

DROP TABLE Source;

Miguel

View solution in original post

4 Replies
veidlburkhard
Creator III
Creator III

Hi Ramya,

you can do this in your script like this:

ID_Long:

LOAD * INLINE [

    ID

    1

    2

    3

    4

    5

    6

    7

];

NoConcatenate

ID_Short:

LOAD ID

Resident ID_Long Where ID < 4;

DROP Table ID_Long;

STORE ID_Short into ID_Short.qvd;

Hope this helps

Burkhard

Miguel_Angel_Baeyens

Hi,

It is possible using EXISTS() clause in the WHERE load statement:

Source:

LOAD ID;

SQL SELECT ID FROM TABLE; //whatever the source it is

QVD: // load only interesting records

LOAD ID

FROM File.qvd (qvd)

WHERE NOT EXISTS(ID);

DROP TABLE Source;

Miguel

Not applicable
Author

It seems to be a right answer...

I will try and will let you know...

SunilChauhan
Champion
Champion

You should use this

table1:

LOAD * INLINE [

   ID

4

5

6

7

];

table2:

LOAD * INLINE [

ID1

1

2

3

4

5

6

7

];

NewTab1:

Load ID,

1 as J

Resident table1;

NewTab2:

Load ID1,

1 as K

Resident table2 where not Exists(ID,ID1);

drop table table1,table2,NewTab1;

Sunil Chauhan