Need to fire 1000 different SQL statements and verify results automatically

UDA
Enthusiast

Need to fire 1000 different SQL statements and verify results automatically

Hi,

I have some 1000 SQL statements which I have written based on different logic. Now I need to run those scripts and verify results againse DB. I can manually run all scripts and verify the results manually against DB.

I need some idea or information if these can be done more efficiently by some sorts of automation or any such tool.

If anyone came with such situation then please pass me the information.

Thanks,
rlaskar
3 REPLIES
Enthusiast

Re: Need to fire 1000 different SQL statements and verify results automatically

rlaskar:
To my knowledge, there are two ways you can automate.

1: Type in all your SQL statements in SQL Assistant. Got to Teradata SQL Assistant's Menu > File > Export Results option. After selecting the option hit F5 function key (or run the SQL). It will ask for enter a file name to save the output. (if you are using Teradata 7.1.0.07 version, go to Tools > options > Export/Import tab and select appropriate options to write the output).

2: Type all your SQL statements in BTEQ script and execute the BTEQ script. Divert your output using a nohup statement.

Enthusiast

Re: Need to fire 1000 different SQL statements and verify results automatically

I am not entirely clear what do you mean by verifying results against DB, but if the only thing you need is to compare the results against some fixed values, you could use the http://www.excelsql.com/ and do it in Excel.
Enthusiast

Re: Need to fire 1000 different SQL statements and verify results automatically

As suggested by Mr.Shastry, you can either use SQL assistant's export option or re-direct the out while running the BTEQ script.

One other way is to use BTEQ's .Export command.You have several modes in which BTEQ transfer the output to destination file.