Need to run many SQL's at one shot even if error occurs inbetween

Database
Enthusiast

Need to run many SQL's at one shot even if error occurs inbetween

Hi,

I need help in executing SQL's. I have some say 50 SQL's combined using UNION ALL. Now when we ran the SQL's at one shot, it stops when it found error like "Column/table does not exist for few SQL" and does not execute any SQL's.

I want the SQL to execute completeley and skip those SQL's where we have errors.

Thanks,
rlaskar
3 REPLIES
Senior Apprentice

Re: Need to run many SQL's at one shot even if error occurs inbetween

Probably no existing DBMS will do what you want.
Of course you can remove the UNION ALL and submit seperate queries.

Dieter
Enthusiast

Re: Need to run many SQL's at one shot even if error occurs inbetween

Let's remove UNION from end of all SQL's. It's just that I tried to execute all SQL's and output to a single file instead of multiple output files for all SQL.

Thanks Deiter.

rlaskar
Senior Apprentice

Re: Need to run many SQL's at one shot even if error occurs inbetween

If you export using BTEQ there'll be one output file.
Newer versions of QueryMan support it, too:
Tools -> Options -> Export/Import -> Write all exported Answersets to a single file

Dieter