0% found this document useful (0 votes)
237 views

Create and Execute BTEQ Script

To create and execute a BTEQ script in Teradata, there are a few steps: 1. Create the BTEQ script using a text editor like vi on a UNIX workstation and save it with a .scr extension. 2. Start BTEQ and use the .run command followed by the script file name to execute it. 3. Comments can be included in the script using /* */ or -- for ANSI style comments.

Uploaded by

vcmsrinivas
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
237 views

Create and Execute BTEQ Script

To create and execute a BTEQ script in Teradata, there are a few steps: 1. Create the BTEQ script using a text editor like vi on a UNIX workstation and save it with a .scr extension. 2. Start BTEQ and use the .run command followed by the script file name to execute it. 3. Comments can be included in the script using /* */ or -- for ANSI style comments.

Uploaded by

vcmsrinivas
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 2

To create and execute the BTEQ script in Teradata we have to follow the below mentioned steps Step 1: Create

the BTEQ Script To create and edit a BTEQ script we can use an editor on or client workstation. For example, on a UNIX workstation we can use text editor.

.SET SESSION TRANSACTION ANSI .LOGON TDUSER/tdpassword SELECT emp_name --Name of employee of Dept table ,department_name --Name of Department of Dept table FROM .QUIT dept;

and save it with name test.scr Step 2: To Execute The Script: Start BTEQ, then enter the following BTEQ command to submit a BTEQ script: Format .run file = <bteqscriptname> Example :.run file= test.scr Note: We can include comments in a BTEQ For example /* commented */ We can also use ANSI style (--) in any SQL command script. In above example we have used ANSI style (--) to provide the comment in

BTEQ command

You might also like