How to Use the BTEQ Script File | Basic Teradata Query - Using the Script File - Basic Teradata Query

Basic Teradata® Query Reference - 20.00

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
Basic Teradata Query
Release Number
20.00
Published
October 2023
ft:locale
en-US
ft:lastEdition
2025-04-02
dita:mapPath
gxl1691484661681.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
psp1479308573013
Product Category
Teradata Tools and Utilities

The following example shows how to create and execute an SQL stored procedure from the script file, when the script is running in ANSI mode. The example.spl file contains the stored procedure source text.

.LOGON e/fml,notebook
.COMPILE FILE = example.spl;
COMMIT;
CALL samplesp1 (8888, pAmount);
.LOGOFF

The next example is a script for a session running in Teradata mode:

.LOGON e/fml,notebook
BT;
.COMPILE FILE = example.spl;
ET;
CALL samplesp1 (pAccountNo, 10000.00);
.LOGOFF