“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: Tekinos Kelkis
Country: New Zealand
Language: English (Spanish)
Genre: Politics
Published (Last): 3 October 2006
Pages: 226
PDF File Size: 11.67 Mb
ePub File Size: 12.65 Mb
ISBN: 483-7-30938-967-3
Downloads: 58564
Price: Free* [*Free Regsitration Required]
Uploader: Yozahn

You can simply update your script to change the keyword Rundate in your.

BTEQ script in Shell Script

Is this script valid? Sign up or log in Sign up using Google. All forum topics Previous Topic Next Topic. By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service.

If exists, drop it else do nothing. Accessing variables of one shell script in another shell script.

Can any one please explian me the below bteq code. I updated my answer.

BTEQ – An Example for script structure in Teradata

Post as a guest Name. Rudic, what chage you are suggesting in order to make it work? Sign up using Facebook. Export the output of scrkpt table in such a format that it beomces executable script and then call that script. Hi Team, I have a requirement where I need to check for table. The sed command will change all occurrences of the keyword Rundate. I am not understanding this code, which is written by someone else.


As is, it is neither a unix script, nor some codenor something bteq could use. Email Required, but never shown. This has to be continued till the last row in my table.

Thus, I want the date to be fixed to check for that data for that day. In reality, my query is bteqq big around line of code so I don’t want to execute scrlpt query inside the shell script. The value of RUNDATE should be assigned at the starting of the shell script, basically, it should be read only once and should remain same throughout the batch process i.

All Linux Man Pages. Any way I can do this in Bteq script other than using shell scripting. Use Export Reset command to achieve the same in one script. Questions seeking debugging help ” why isn’t this code working?

BTEQ Script Processing

How to write config shell script to pass variables in master shell script? XYZ No, everything “echo’d” out will just be run by the terminal. By the by, you should avoid uppercase for you own variables, as uppercase is reserved for system use. But I also know nothing about how your database is setup to evaluate if the rest is valid.

Add as many as you want separated by a semi colon. This avoids the pesky external file, and also coincidentally removes the fugly useless use of cat. I have edited my question. What about executing the table content? By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service. Can you help me with that. Xander Luciano 2, 2 21 It would output and run something like:.


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. 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. If that is added in the. Sign up using Email and Password.

You might want to refine this by having a more restrictive search for example: Any way by which I can solve this problem. Sign up using Email and Password. Find all posts by Scrutinizer.

I have a shell script. Find all posts by RudiC. Then it doesn’t help my cause since everytime this function runs it consider the system date and modifies accordingly.