Home Page for the TeradataForum
 
 

 

Archives of the TeradataForum





Message Posted: Wed, 09 Jun 2004 @ 13:05:02 GMT





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




Subj:   Re: Formatting string to DATE
 
From:   Geoffrey Rommel



  But when i use same qry in MLOAD the session is coming out with error (2797). [Mark Missing Update]  


  the qry that i use in MLOAD script is  


     UPDATE G_STATUS SET END_DT = ? (DATE, FORMAT 'MM/DD/YYYY') (FORMAT
     'YYYY-MM-DD') WHERE C_CD = ? AND END_DT='2050-12-31'

Instead of parameter markers, use colons followed by the names defined in your .field statements. For instance, if your input is defined thus:

     .field i_end_dt     1 char(10);
     .field i_c_cd       * char(1);

your update should be:

     UPDATE G_STATUS SET END_DT = :i_end_dt (DATE, FORMAT 'MM/DD/YYYY')
      WHERE C_CD = :i_c_cd AND END_DT='2050-12-31'

The second FORMAT clause is not needed.





     
  <Prev Next>   <<First <Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
 
  Top Home Join Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky 
Last Modified: 30 Jun 2008