Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 23 Nov 2004 @ 14:03:17 GMT


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


Subj:   Re: Help understanding the Like operator
 
From:   Geoffrey Rommel

The other folks have answered your question, but just to spell out the details: the column names are stored in the data dictionary in char(30) columns, so most of them will have trailing blanks. Also, the underscore must be escaped. You therefore need to write

     WHERE columnname like '%!_ID %' escape '!'

which will work except for column names that are exactly 30 bytes long. If you have some of those, you can write

     WHERE columnname like any ('%!_ID %', '%!_ID') escape '!'

which will work unless you have some column names that contain embedded blanks! If that's the case, heaven help you.



     
  <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