“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.
|Published (Last):||10 July 2006|
|PDF File Size:||13.39 Mb|
|ePub File Size:||10.78 Mb|
|Price:||Free* [*Free Regsitration Required]|
It would output and run something like:. Any variable or wildcard in the here document will be evaluated by the shell before bteq runs as long as you don’t quote the here-document delimiter ; that’s why the asterisk has btea be backslash-escaped otherwise the shell would expand the glob to a list of all the files in the current directory.
You might want to refine this by having a more restrictive search for example: Pleasehelp me overcome them. Be aware, that the ; at the wcript would never be passed to the script. Looks like you are really looking for a here document. I have a shell script. The sed command will change all occurrences of the keyword Rundate.
Teradata – BTEQ
This has to be continued till the last row in my table. Shell script works fine as a standalone script but not as part of a bigger script. View Public Profile for RudiC. Sign up or log in Sign up using Google.
linux – Passing variables from shell script to BTEQ File – Stack Overflow
By the by, you should avoid uppercase for you own variables, as uppercase is reserved for system use. I have edited my question.
Can you help me with that. What about executing the table content? Post as a guest Name.
Find all posts by Scrutinizer. I think This approach may work Call a function in shell script from another shell script. Questions without a clear problem statement are not useful to other readers. ULick 3 BUT if table does not exists, it still goes to drop it, which I do not want it to do. Can you help sxript solve that issue? Can you advise me now as to how should I proceed. 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.
XYZ No, everything “echo’d” out will just be run by the terminal.
At the top of the script. Thus, I want the date to be fixed to check for that data for that day. Rudic, what chage you are suggesting in order to make it work?
Further guessing, because BTEQ is mentioned in the name for the log file, in that. Not a Forum Member? Add as many as you want separated by a semi colon.
BTEQ script in Shell Script
Unable to pass shell script variable to awk command in same shell script. How to pass a parameter from one Shell-script to another Shell-script. Page 1 of 2. Sign up using Facebook. 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 content.
What is a dot command. Any way I can do this in Bteq script other than using shell scripting. What I don’t want: