Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Sun, 26 Feb 2006 @ 10:20:09 GMT


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


Subj:   Macro Passing Parameter to IN clause
 
From:   Joseph.Massena

Hi everyone,

I am trying to pass a string ('123','3456','XDFG','XDFT') to a macro similar to the one below

     creata macro test( startd date, endd date, group_ids as varchar (50) )
     as (
     insert into tbl_a
     sel * from tbl_z where
     group_id_field in ( :group_ids )
     and date_field between :startd and :endd
     ););

when I execute

     "exec test ( ('2006-01-01'),('2006-01-31'), ('123','3456','XDFG','XDFT')
     );"

it gives me a syntax error 3707 expected something like ')' between a string and ','. I know that its not taking the set of group id because it thinks there is another parameter that I am passing but what is the solution to this problem.

Any advise is greatly appreciated.


Thanks

Joseph



     
  <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: 27 Dec 2016