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: 
colinodonnel
Creator II
Creator II

SQL IF EXISTS

Hello there,

I am loading tables a bunch of tables via SQL, including 1 from SQL Sandbox (a temporary table).

When running the extract app, the script fails if the Sandbox temporary table does not exist.

How can i amend the Qlik Script to ignore this error so the Load script does not fail.

Thanks,

Colin

 

Labels (2)
1 Solution

Accepted Solutions
Or
MVP
MVP

Set ErrorMode = 0;

SQL Select * From SandboxTable;

Set ErrorMode =1;

Note that this will ignore any error during the SQL load and the data from that table will not be available if the select failed (so you won't be able to further load from it or reference it using Resident etc.)

https://help.qlik.com/en-US/sense/November2021/Subsystems/Hub/Content/Sense_Hub/Scripting/ErrorVaria...

 

View solution in original post

2 Replies
Or
MVP
MVP

Set ErrorMode = 0;

SQL Select * From SandboxTable;

Set ErrorMode =1;

Note that this will ignore any error during the SQL load and the data from that table will not be available if the select failed (so you won't be able to further load from it or reference it using Resident etc.)

https://help.qlik.com/en-US/sense/November2021/Subsystems/Hub/Content/Sense_Hub/Scripting/ErrorVaria...

 

colinodonnel
Creator II
Creator II
Author

That is perfect. 

Thank you,

Colin