Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 31 Jul 2003 @ 19:30:32 GMT


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


Subj:   CONVERTING NULLS
 
From:   Nick Druga

Does anyone know how to change all NULL values in all fields to a space, zero or some date (depending on existing format) without updating each field, one at a time?

/* RECORD_ID is CHAR */
UPDATE td_table
   SET RECORD_ID   = ' '
 WHERE RECORD_ID   IS NULL;

/* PROCESS_NUM is INTEGER */
UPDATE td_table
   SET PROCESS_NUM = 0
 WHERE PROCESS_NUM IS NULL;

/* DATE_FILLED is DATE */
UPDATE td_table
   SET DATE_FILLED = DATE '0001-01-01'
 WHERE DATE_FILLED IS NULL;

.
.
.
etc.


     
  <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