25.09.2015 Views

Teradata Parallel Data Pump

Teradata Parallel Data Pump Reference - Teradata Developer ...

Teradata Parallel Data Pump Reference - Teradata Developer ...

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 3: <strong>Teradata</strong> T<strong>Pump</strong> Commands<br />

INSERT<br />

.<br />

.<br />

.<br />

.FIELD flast * datatype;<br />

.DML LABEL label;<br />

INSERT INTO targetable VALUES (:first, :f2nd, ... :flast);<br />

Example 3<br />

Example 4<br />

.LAYOUT lname;<br />

.FIELD first 1 somedatatype;<br />

.FIELD f2nd * anydatatype;<br />

.<br />

.<br />

.<br />

.FIELD flast * datatype;<br />

.DML LABEL label;<br />

INSERT INTO targetable (col1, col2, ... colast)<br />

VALUES (:f2nd, :first, ... :flast);<br />

An input data source contains a series of 10- to 40-byte records. Each record contains the<br />

primary index value (EmpNum) of a row that is to be inserted successively into the Employee<br />

table whose columns are EmpNo, Name, and Salary.<br />

.BEGIN LOAD SESSION number ;<br />

.LAYOUT Layoutname;<br />

.FIELD EmpNum 1 INTEGER;<br />

.FIELD Name * (VARCHAR (30));<br />

.FIELD Sal * (DECIMAL (7,2));<br />

.DML LABEL DMLlabelname;<br />

INSERT Employee (EmpNo, Name, Salary) VALUES (:EmpNum, :Name, :Sal);<br />

.IMPORT INFILE Infilename LAYOUT Layoutname APPLY DMLlabelname;<br />

.END LOAD;<br />

<strong>Teradata</strong> <strong>Parallel</strong> <strong>Data</strong> <strong>Pump</strong> Reference 159

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!