Archives of the TeradataForum
Message Posted: Mon, 19 Mar 2007 @ 23:05:18 GMT
Subj: | | Re: NULLIF in .FIELD |
|
From: | | Anomy Anom |
<-- Anonymously Posted: Monday, March 19, 2007 16:51 -->
So let me get this straight. Your input is VARTEXT and when the input is a null string or blanks (which is not the same as NULL in the
database) then you want to substitute a default value 'XYZ'?
Then NULLIF is the opposite of what you want - it says set the database value to NULL if the condition is true. Use a CASE statement in the
INSERT instead.
CASE WHEN :IN_a = '' THEN 'XYZ' ELSE :IN_a END
|