All Forums Jobs
Lords 4 posts Joined 07/12
09 Jul 2012
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

 

 

 

 

Lords 4 posts Joined 07/12
09 Jul 2012

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

 

ulrich 816 posts Joined 09/09
09 Jul 2012

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

 

 

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

Lords 4 posts Joined 07/12
09 Jul 2012

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

Lords 4 posts Joined 07/12
09 Jul 2012

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

 

 

ulrich 816 posts Joined 09/09
09 Jul 2012

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.

 

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

You must sign in to leave a comment.