Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 23 Jul 2004 @ 14:09:23 GMT


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


Subj:   Re: MLOAD of a file with multiple record types
 
From:   viswanathan.karthikeyan

hi,

I think below will solve the problem.

     .LOGON DEMOTDAT/dbc,dbc;
     .LOGTABLE LIC.LOG_TST1;
     .BEGIN IMPORT mload TABLES
      LIC.a,
      LIC.b

      ;
     .layout  LA;
     .Field id 1 varchar(1);
     .FIELD a 2 varchar(1);
     .FIELD b 3 varchar(5);
     .FIELD c 8 varchar(6);
     .FIELD d 14 varchar(1);

     .DML LABEL DA ;
     INSERT INTO LIC.A
     (
     a
     ,b
     ,c
     ,d
     )
     VALUES
     (
     :a
     ,:b
     ,:c
     ,:d
     );
     .DML LABEL DB1;
     INSERT INTO LIC.B
     (
     a
     ,b
     )
     VALUES
     (
     :a
     ,:b
     );
     .IMPORT INFILE C:\TEST.TXT
     LAYOUT LA
     Format text
     APPLY DA where id = 'a'
     APPLY DB1 where id = 'b';

     .END MLOAD;
     Data:
     y2v
     z4d

regards,

karthi



     
  <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