Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 31 Jul 2003 @ 19:51:08 GMT


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


Subj:   Re: CONVERTING NULLS
 
From:   David Wellman

Nick,

Not sure how practical this is (depends on number of columns on your table) but something like:

update td_table
  set record_id  = coalesce(record_id,' ')
     ,process_num = coalesce(process_num,0)
     ,date_filled = coalesce)date_filled,10101)
.....
where record_id is null
   or process_num is null
   or date_filled is null
.....

This will only update a row if something has to change (rather than updating a row multiple times as below). If you're concerned about transient journaling (how many rows per AMP are likely to change?) then you may want to consider an insert select into an empty table.


Cheers,

Dave



     
  <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