“Hi experts, Can any one post sample bteq script. My requirement is to unload a table with a tera data sql query in to a file whos efileds are pipe delimited. BTEQ can be used as a Query tool, to load data a row at a time into Teradata and to export data off of Teradata Below is the example of BTEQ IMPORT Script. This topic describes the commands that are used in the BTEQ script when configuring Teradata Alerts.

Author: Meshakar Talrajas
Country: Nigeria
Language: English (Spanish)
Genre: Career
Published (Last): 3 February 2013
Pages: 272
PDF File Size: 11.10 Mb
ePub File Size: 18.22 Mb
ISBN: 149-2-74883-543-7
Downloads: 89508
Price: Free* [*Free Regsitration Required]
Uploader: Mooguk

Shell script works fine as a standalone script but not as part of a bigger script. I realized that the solution you gave was not really fulfilling scropt condition.

Bteq script to read and execute query from a table – Teradata Community

Add as many as you want separated by a semi colon. If scrkpt want the date to stay put once you have calculated it so that it doesn’t change underneath if the script runs past midnight. Stack Overflow works best with JavaScript enabled. You can simply update your script to change the keyword Rundate in your.


It would output and run something like:.

For that I written below code. My requirement is I need to write a bteq script which reads row by row from this table until the last row, and execute the row scritp. What about executing the table content? How to execute one shell script after execution of another shell script?

Bteeq Avinash, each single quote within a string must be doubled: Be aware, that the ; at the end would never be passed to the script. Can any one please explian me the below bteq code. ULick 3 All times are GMT Post Your Answer Discard By clicking “Post Your Answer”, you acknowledge that you have read our updated terms of serviceprivacy policy and cookie policyand that your continued use of the website is subject to these policies.

Thus, I want the date to be fixed to check for that data for that day. Sign up using Facebook.

At the top of the script. But I also know nothing about how your database is setup to evaluate if the rest is valid. View Public Profile for RudiC. Pleasehelp me overcome them. It seems to work fine with this.

By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service. I want to pass ‘Date’ variable from shell script into the BTEQ file sfript that the query that executes takes that ‘date’ into account. View Public Profile for Scrutinizer. All forum topics Previous Topic Next Topic.


Xander Luciano 2, 2 21 Sign up using Email and Password. So I don’t think that script is valid.

Shell Programming and Scripting

I have edited my question to state my use-case more clearly. It would output sceipt run something like: Accessing variables of one shell script in another shell script. Please prove me wrong.

If i remove the column name manually and run ,then second export stmt is printing as below,need to eliminate the column heading from it. I will read the first row from the table, I need to execute the content in col1 and col2 of row 1 and store it in to another table.