Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 02 Jun 2008 @ 21:03:27 GMT


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


Subj:   Re: Name search in a macro
 
From:   Mohommod.Khan

I think some thing like this will work. Also don't forget the trim....

     replace macro myMacro
     (last_Name char(30))
     as  (
     select Trim(Last_Name)  (char(30)) as l_Name
     from db.Name
     where l_Name  like   '%' || trim(:Last_Name) || '%'     ;);

Then you can call it as follows:

     exec myMacro ('khan')

Thanks!



     
  <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