Need help on executing the BTEQ commands through PERL script

Database
N/A

Need help on executing the BTEQ commands through PERL script

Hi
can anyone get me the way in which the BTEQ script/commands to be executed through the PERL script.

My requirement is,

In a file I'm having a set of SQL queries for TERADATA.
I need to run it in TD at a time.
It'll give no. of answer sets & those sets are to exported to a file(same file).
For that I'm writing a perl script, but I don't how to execute those queries in perl.

Anybody's help will be appreciated.

Thanks & Regards,
Arul
1 REPLY
hh
Enthusiast

Re: Need help on executing the BTEQ commands through PERL script

If your perl script can call out to an OS command, then you can execute bteq script. However, if you are just trying to get some result sets from teradata using bteq and export the results to files, use the "export" command in bteq and perl is not needed, just do bteq < my_queries.txt in Unix or windows prompt.