Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 19 Mar 2007 @ 23:05:18 GMT


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


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


     
  <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