Archives of the TeradataForum
Message Posted: Thu, 31 Jul 2003 @ 19:30:32 GMT
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.
|