Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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;
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');
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');
Thank you!