Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 14 Mar 2002 @ 02:40:46 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Multiload with comma delimited input file
 
From:   Wesley G. Loftis

Here is a MLOAD with a | delimiter. The FORMAT VARTEXT command is used.

Comma should be ok, as long as commas are not used in your input data. I usually try to use a | or ~ for that reason.

.LOGTABLE wgltest.L_testsum2;
.logon demo1099/dbc,dbc;
database wgltest;

.BEGIN IMPORT MLOAD TABLES testsum2
        WORKTABLES      W_testsum2
        ERRORTABLES     E_testsum2
                        U_testsum2
        ERRLIMIT 50
        AMPCHECK ALL;

.LAYOUT INPUTLAYOUT;
        .FIELD  I_cmpy_cd                          * VARCHAR(10);
        .FIELD  I_st_cd                            * VARCHAR(10);
        .FIELD  I_the_date                         * VARCHAR(10);
        .FIELD  I_actv_accts_tot                   * VARCHAR(10);

.DML LABEL INSERTS;

INSERT INTO testsum2
        (
         cmpy_cd,
         st_cd,
         the_date,
         actv_accts_tot
        )
VALUES
        (
        :I_cmpy_cd,
        :I_st_cd,
        :I_the_date,
        :I_actv_accts_tot
        );
.IMPORT INFILE c:\@TD_SCRIPTS\test.dat

        FORMAT VARTEXT '|' DISPLAY ERRORS NOSTOP
        LAYOUT INPUTLAYOUT
        APPLY INSERTS;

.END MLOAD;
.LOGOFF;

Wes Loftis
Data Warehouse Consultant
Teradata
(a Division of NCR Corp)



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023