Академический Документы
Профессиональный Документы
Культура Документы
This appendix describes the lab environment that will be used during the class.
Lab Environment
DBC
UNIX userids uljc01 uljc02 uljcxx
Teradata_Factory AU
Accounts Customer Trans Useful Teradata Commands in BTEQ:
.LOGON tpdid/username HELP SESSION; HELP USER username; HELP 'SQL sqlcommand'; SHOW TABLE tablename; SELECT COUNT(*) FROM tname; DELETE tablename ALL; DROP TABLE tablename; EXEC macroname; .RUN FILE=filename .QUIT - logon to Teradata - displays session information - lists objects owned by user - help for an SQL command - shows table creation syntax - provides count of rows - deletes all rows in a table - drops table from the database - executes a macro - executes a file of commands - exits BTEQ
DS
Orders Orders_2003
PD
Department Employee Emp_Phone Job tljc01
Accounts
Orders
LJC_Students
tljc02
Accounts
Orders
tljcxx
Accounts Orders
AU Tables
AU.Accounts (10,000 Rows)
Account Number Number Street PK UPI 20024010 20031023 20049873 20031134
Integer
City
State
Zip Code
Balance Forward
Balance Current
CA CA NV CA
Char(2)
PD Tables
Employee (1000 Rows)
Employee Number PK UPI 100001 100797 100002
Integer
Last Name
First Name
Salary Amount
Job Description
UPI
1048 1050 1028
Integer
FK
Design SW Design Services Engineering SW
Char(20)
DS Tables
Orders (3600 Rows)
o_orderid o_custid o_orderstatus o_totalprice o_ordedate o_orderrpriority o_clerk o_shippriority o_comment
PK
UPI 100001 103501 101400
FK,NN
1001 1451 1080 C C C 1,005.00 1,005.00 1,150.00 2000-01-02 2002-12-01 2001-02-28 10 10 10 Jack .. Dee ... Fred ... 20 20 20 In Stock In Stock In Stock
Integer
Integer
CHAR(1)
Decimal (10,2)
Date
SmallInt
Char(16)
SmallInt
Varchar(79)
Modification
r x X 5x dw dd d$ dG cw C J yy 3yy p P u replace 1 character delete char under cursor delete char before cursor delete 5 characters delete a word delete the line delete the rest of the line delete rest of the file change a word change rest of the line join 2 lines together yank or copy a line yank or copy 3 lines put yanked line(s) after line put yanked line(s) before line undo last command
Input mode
i I a A o O R insert before cursor insert at beginning of line insert after cursor insert at end of line open a new line below open a new line above Replace mode and insert after <cr> ESC exits input & colon modes
Colon mode
:w :w fname :wq :q! :e fname :r fname :!cmd :set smd write or save the file write new file name write and quit quit and dont save edit another file read in a file run UNIX command set showmode on