Sie sind auf Seite 1von 4

BTEQ Command list

Note: All the commands start with. [SET] and terminated by a semi colon.
For format !rose they are not incl!ded in e"ery command in this
doc!ment. BTEQ (bee-teek) is short form of Basic Teradata Query. BTEQ
commands (total 55) are categoried as session control! file control! se"uential
control and format control commands
#
Example: = 5 (repeats the previous SQL command for 5 times. Default value is 1.)
annot !e used in SQL macro.
AB$%T " interrupts a SQL.
Example: #$%&'
C$&'()E " creates or replaces a procedure o!(ect in the data!ase usin) a S*L input
file.
Example: ompile file = +testprocedure.spl, -ith spl.
ompile command must !e the last command in the open transaction.
*EFA+)TS " &esets $'EQ commands to defaults those -ere set -hen $'EQ first
invo/ed.
Example: DE0#1L'S
EC,$%EQ " Specifies -hether a SQL re2uest or $'EQ command should !e placed in
the output stream.
Example: E3%&EQ %4
5t cannot !e used in SQL macro.
E%%$%)E-E) " assi)ns severit6 level to errors.
Example: E&&%&LE7EL 89:; SE7E&5'< :=
(>?85= ?859= 859;) SE7E&5'< 8.
E&&%&LE7EL 14@4%A4 SE7E&5'< 1>.
E%%$%$+T " &outes the standard output stream and output stream to a specified
file or device. 5t -or/s differentl6 for channelBattached s6stem and net-or/ attached
s6stem.
Example: E&&%&%1' S'DE&& %& S'D%1'
E.(T " Lo) off all the 'eradata sessions and exit $'EQ.
Example: EC5'
<ou cannot use EC5' command in 'eradata macro.
E.'$%T " Export command export the response of the SQL re2uest in to a specified
file.
Example: EC*%&' D#'# 05LE = +EC*%&'.D#',.
5f the response is more than >D$ use #CSE%DE.
F$)*)(NE " Splits a line in to t-o or more lines after the specified columns. 'he
maximum num!er of column is >:8F.
Example: 0%LDL54E %4 > 8 (splits line after >
nd
and 8
th
column.)
F$$T(N/ " 0ootin) specifies footer notes on the !ottom of ever6 pa)e of a report. 5t
can !e used in a SQL macro. 'he maximum num!er of characters includin) a
carria)e control is >58= to descri!e up to 1: lines.
Example: 0%%'54D +GD#'E HH 'ES' 0%%'54D &ES1L'S HH *a)eG*#DE,
F$%&AT " 0ormats the results of a SQL statement. Default value is %00.
Example: 0%&E#' %4 H %00
F+))0EA% " Date is displa6ed in fourBdi)it 6ear format. 5t affects onl6 footer= header
and title line.
Example: 01LL<E#& %4
/$T$ " S/ip over all intervenin) $'EQ commands and SQL commands until a
specified la!el is encountered then resumes processin).
Example: D%'% Ila!el nameJ
,AN/ " *ause the $'EQ process for a specified time.
Example: 3#4D 1: (han)s $'EQ process for 1: seconds.)
,EA*(N/
Specifies a header at the top of each pa)e of the report
Example: 3E#D54D +'35S 5S # 3E#D54D,
,E)' " displa6s a list of all availa!le $'EQ commands and nonB)raphic
representation of their s6ntax.
Example: 3EL* $'EQ
(F1T,EN1 B 'ests the validit6 of the condition stated in 50 clause.
Example: 50 E&&%&%DE = ?::: '3E4. D%'% 4EC'&E*%&'
50 E&&%&LE7EL = : '3E4 %4'541E
)ABE) " 5dentifies a point -here $'EQ resumes process= as stated in previous D%'%
statement.
Example: L#$EL Ila!el nameJ
)$/$FF " 'erminates 'eradata &D$ES session -ithout exitin) from $'EQ
Example: L%D%00
)$/$N " onnects to 'eradata &D$ES.
Example: L%D%4 'D*5D Kuser id= pass-ord Laccount strin)M
&A.E%%$% " Desi)nates a maximum severit6 error lever !e6ond -hich $'EQ
terminates (o! processin).
Example: E#CE&&%& ; (5n this case if error level F occurs= $'EQ exits from
processin).)
&ESSA/E$+T " Specifies a output file for $'EQ to send messa)es that -ould
normall6 !e sent to standard output.
Example: EESS#DE%1' 05LE=out.lo)
N+)) " Specifies a character or character strin) to represent a null field resultin)
from a SQL statement.
Example: 41LL #S +NNN,
$&(T " Excludes specified columns from SQL statement results.
Example: %E5' %4 #LL= %E5' %4 >= %E5' %4 1=>=8
$S " Su!mits an operatin) s6stem command to the net-or/ attached s6stem.
Example: %S dir= %S find
'A/EB%EA2 " E(ects a pa)e -henever specified column value chan)es.
Example: *#DE$&E#@ %4 >= *#DE$E#@ %4 #LL= *#DE$&E#@ %4 >=5
'A/E)EN/T, " Specifies the maximum num!er of lines printed on a pa)e.
Example: *#DELE4D'3 5:
Q+(ET " Limits $'EQ output to errors and re2uest processin) statistics.
Example: Q15E' %4
Q+(T " Lo)s off 'eradata session and exist from $'EQ. 5f 'eradata session is alread6
lo))ed off then (ust exists from $'EQ.
Example: Q15'
%EC$%*&$*E " &eturns data from SQL statement in a client oriented data format
rather than character format.
Example: &E%&DE%DE %4
%E&A%2 " *laces the specified strin) on the standard output.
Example: &EE#&@ +this is a remar/OO,
%E'EAT " Su!mits the next SQL statement for the specified num!er of times.
Example: &E*E#' 5 (Executes the su!se2uent SQL statement for 5 times.)
%E'EATST$' " $'EQ stops the entire &E*E#' execution of a nonBretr6 ta!le error
occurs.
Example: &E*E#'S'%* %4
%ETCANCE) " ancel a re2uest -hen a specified !6 the &E'L5E5' commands ro-s
option is exceeded.
Example: &E'#4EL %4
%ET)(&(T " Specifies the maximum num!er of ro-s can !e displa6ed on screen or
-rite to the output file in response to a SQL statement.
Example: &E'L5E5' 1:
%ET%0 " &esu!mits re2uests that fail under certain operational error conditions.
Example: &E'&< %4
%T(T)E " Specifies a title that appears at the top of each pa)e in the report.
Example: &'5'LE +&eport,s title,
%+N " *rocess 'eradata SQL re2uests and $'EQ commands from a specified file.
Example: &14 05LE=lo)on.txt
SE'A%AT$% " Specifies the -idth and contents of the strin) to !e placed !et-een
the columns in a report.
Example: SE*#&#'%& + 5'EE,S 7#L1E,= SE*#&#'%& +H,
SESS($N C,A%SET " 5dentifies the character set for the session.
Example: SESS5%4 3#&SE' +1'0F,
SESS($N %ES'B+F)EN " %verrides the !uffer len)th specified in respP!ufPlen of
L5,s s6stem parameter !loc/ (S*$).
Example: SESS5%4 &ES*$10LE4 DE0#1L' H H E#C?> H E#C98 H >59 " n
SESS($N SQ)F)A/ " Ena!les or disa!les the issue of -arnin)s in response to
s6ntax errors in accordance -ith 05*S (0ederal 5nformation,s *rocessin) Standards)
Example: SESS5%4 SQL0L#D 4%4E H E4'&< H 54'E&EED5#'E
SESS($N T%ANSACT($N " Specifies -hether transaction !oundaries are
determined !6 'eradata standards or #4S5 standards.
Example: SESS5%4 '&#4S#'5%4 $'E' H #4S5 (Default is $'E')
SESS($N T3$%ES'B+FS " Specifies -hether L5 dou!le !ufferin) is used or not.
Example: SESS5%4 'A%&ES*$10S %4 H %00 (Default is %4)
SESS($NS " Specifies the num!er of 'eradata sessions is to lo) on at next lo)on.
Example: SESS5%4S ?
S,$3 C$NT%$)S " Displa6s the current settin) of formattin) command options.
Example: S3%A %4'&%LS
S,$3 E%%$%&A' " Displa6s the contents of the ta!le that maps error code to
severit6 levels.
Example: S3%A E&&%&E#* %4
. SE' E&&%&LE7EL 8155 SE7E&5'< 1>
S,$3 -E%S($NS " &eturns current version of each $'EQ module.
Example: S3%A 7E&S5%4S
S(*ET(T)ES " *ositions titles of summar6 lines on the left side of the data returned
!6 SELE' statement that included one or more A5'3 clause.
Example: S5DE'5'LES %4 nH %00
S2('*$+)ES " 5nserts t-o !lan/ lines in the report -henever the value of specified
column chan)es.
Example: S@5*D%1$LE %4 n H %00
S2(')(NE " 5nserts a !lan/ line in the report -henever the value of the specified
column chan)es.
Example: S@5*L54E %4 n H %00
S+''%ESS " &eplaces all consecutive values in the report -ith !lan/ characters.
Example: S1**&ESS %4 H %00
T*' " Sets the 'eradata Director *ro)ram as a default tdpid for su!se2uent lo) on in
the current session.
Example: 'D* Demo'dat
T(&E&S/ " *rints the total time of the re2uest.
Example: '5EEEED Q1E&< H DE0#1L'
T(T)E*AS,ES " Ena!les or 5nhi!its a line of dashed characters immediatel6 !efore a
report summar6 line )enerated !6 A5'3 clause.
Example: '5'LED#3SES %4 n H %00
+N*E%)(NE " 5nserts a dashed line across the entire -idth of the report -henever
the value of the specified column chan)es.
Example: 14DE&L54E %4 n H %00
3(*T, " Specifies the maximum -idth for the report.
Example: A5D'3 F:

Das könnte Ihnen auch gefallen