Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 03 Dec 2003 @ 04:50:49 GMT


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


Subj:   Re: MLOAD - Multiple record types
 
From:   Judge, James A

Should be the APPLY clause of the IMPORT command:

.LAYOUT layout;
.FIELD rectype              1           CHAR(1);
.....
.FIELD DELETE_SW                2777 CHAR(1);
....

.DML LABEL UPSERT_LABEL
DO INSERT FOR MISSING UPDATE ROWS;
SQl statement....

.DML LABEL DELETE_LABEL;
DELETE table
      WHERE
 ACCT_NO = :ACCOUNT_NUMBER;

.IMPORT INFILE filename
        LAYOUT layout
        APPLY UPSERT_LABEL
                      WHERE rectype = '1' AND DELETE_SW NE 'Y'
        APPLY DELETE_LABEL
                      WHERE rectype = '1' AND DELETE_SW ='Y'
 ;


     
  <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