“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):||27 August 2009|
|PDF File Size:||2.24 Mb|
|ePub File Size:||4.6 Mb|
|Price:||Free* [*Free Regsitration Required]|
BTEQ – An Example for script structure in Teradata
BTEQ Script Processing
If you want the date to stay put once you have calculated it so that it doesn’t change underneath if the script runs past midnight. What about executing the table content? Tags scripscriptshellshell scriptshell scriptsteradata.
The same could be done with sedof course — just make sure you don’t use single quotes, as those prevent the shell from seeing and modifying the variable.
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.
Accessing variables of one shell script in another shell script. The shell would take it as end of command token. How to write config shell script to pass variables in master shell script?
BTEQ Script Processing
Why a dot-command is used to execute a script, which is named. I realized that the solution you gave was not really fulfilling the condition. Unless you scripr give specific errors and information about how your files are setup and doing, it’s hard to help you.
All forum topics Previous Topic Next Topic. I think This approach may work The sed command will change all occurrences of the keyword Rundate. You can simply update your script to change the keyword Rundate in scrit.
Post as a guest Name. Call a function in shell script from another shell script. What is a dot command. 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.
Then it doesn’t help my cause since everytime this function runs it consider the system date and modifies accordingly. So I don’t think that script is valid. Use Export Reset command to achieve the same in one script.