Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 31 Aug 2000 @ 09:47:24 GMT


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


Subj:   Re: Macro parameters
 
From:   David Wellman

Barbara,

I don't know whether you've managed to suss this, but I've tried the following on some simple test data and I think it does what you want.

     replace macro m1
     (invar varchar(255))
     as
     (select *
       from t1
       where index(:invar||' ', trim( leading from (c1 (format
     'zzzzzzzzz9'))||'
     '  )   )  >0;);

Make sure you get the spaces concatenated correctly in the "WHERE INDEX.." clause.

To use this, the user needs to supply the parameter value with spaces between each value, such as "exec m1 ('1 23 356')"

Give it a go and see how you get on.


Regards,

Dave



     
  <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