Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
reshmakala
Creator III
Creator III

Incremental Load

Hi guys!

I have a very simple incremental load script where I am trying to use NOT EXISTS. It gives me a "missing SELECT Keyword" error. Can anyone help me on this please?

My script:

IF NOT Alt(FileSize('Data.qvd'),0) >0 THEN

  TRACE 'file doesnt exists';

 

Data:

LOAD Country,

Loc_Key

....

;

SQL SELECT

Country,

Loc_Key,

....

FROM "XYZ"

WHERE Country='USA';

STORE Data into Data.qvd(qvd);

ELSE

trace 'file exists';


Data:

LOAD * FROM Data.qvd(qvd);

Concatenate (Data)

LOAD Country,

Loc_Key

....

;

SQL SELECT * FROM (SELECT

Country,

Loc_Key,

....

FROM "XYZ"

WHERE Country='USA')

WHERE NOT EXISTS(Loc_Key);

STORE Data into Data.qvd(qvd);

ENDIF;

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Data:

LOAD * FROM Data.qvd(qvd);

Concatenate (Data)

LOAD

     Country,

     Loc_Key

     ....

WHERE NOT EXISTS(Loc_Key);

SQL SELECT * FROM

     (SELECT

          Country,

          Loc_Key,

          ....

          FROM "XYZ"

          WHERE Country='USA');

View solution in original post

2 Replies
MK_QSL
MVP
MVP

Data:

LOAD * FROM Data.qvd(qvd);

Concatenate (Data)

LOAD

     Country,

     Loc_Key

     ....

WHERE NOT EXISTS(Loc_Key);

SQL SELECT * FROM

     (SELECT

          Country,

          Loc_Key,

          ....

          FROM "XYZ"

          WHERE Country='USA');

reshmakala
Creator III
Creator III
Author

Thank you!