Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 10 Dec 2012 @ 15:16:02 GMT


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


Subj:   Re: TPT - Filter condition.
 
From:   Geoffrey Rommel

  I need to omit those records while loading for which the amount field (say f1) having value greater than 1000.  


If the incoming varchar fields are in a predictable format, you could add this condition to your APPLY statement, thus:

     APPLY
     ('INSERT INTO Table1(
     F1,
     F2)
     Values(:f1,:f2 );')
     TO OPERATOR (File_Loader[2])
     SELECT * FROM OPERATOR(File_Reader[1])
     WHERE f1 > '  1000';    /* only works if f1 has the same format in all records! */

BUT instead I would recommend that you load all records to a staging table and then remove the unwanted records (using SQL) at a later stage in the process.



     
  <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