How to create a .bat file for a BTEQ query

Tools
Fan

How to create a .bat file for a BTEQ query

HI,

I have 10 different .txt files which contains the BTEQ script.

I can able to run all them though the command prompt.

Now, i want to create a .bat file, which should call all of the 10 .txt files (Which has the BTEQ scipt within) and executes.

Please help me on this.

Thanks,

Lords

6 REPLIES
Fan

Re: How to create a .bat file for a BTEQ query

Also, can some one explain me where to go and post our question on this forum?

Supporter

Re: How to create a .bat file for a BTEQ query

You seem to manage to post to the forum. So what is your question here?

bat file

call the scripts in the bat file like

bteq < yoursql.txt > yoursql.log 2>&1

Ulrich

Fan

Re: How to create a .bat file for a BTEQ query

HI Ulrich,

I have a text file, which contains the BTEQ script within.

I can able to exeute this file   the command prompt.

Ex:

C:\ BTEQ < myfilename.txt

Now i want to create a batch file (.bat), which should execute the BTEQ scripts which is written inside the text files.


So that, i can add that batch file inthe windows scheduler.

Can you please assist me to complete this requirement.

Thanks,

Lords

Fan

Re: How to create a .bat file for a BTEQ query

Ultimate intension is to, execute the queries through the windows scheduler...

Supporter

Re: How to create a .bat file for a BTEQ query

Open an editor

paste 

bteq < myfilename.txt > myfilename.log 2>&1

into it 

and save it as 

batchsql.bat 

you can call this file from an windows cmd window and it will execute your bteq and create a log file.

Re: How to create a .bat file for a BTEQ query

not very helpfull but thanks anyway