Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 16 Aug 2002 @ 20:16:17 GMT


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


Subj:   Re: CASE in Ins/Sel
 
From:   McBride, Michael

This small change to the sql should always work...

        INSERT INTO NEWTABLE
        ( SUBSTRFLD)
        SELECT
        (CASE
          WHEN SUBSTR(WHOLEFLD,4,1)='S' THEN 'S'
          WHEN SUBSTR(WHOLEFLD,4,1)='N' THEN 'N'
        ELSE NULL
        END)
        FROM OLDTABLE;

mem



     
  <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