Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 06 Dec 2005 @ 15:13:58 GMT


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


Subj:   Re: Objectname as a parameter to macro
 
From:   Judge, James

You cannot pass an object (table, column, database) as input to macro SQL. You are wanting "dynamic SQL" which is not part of macro functionality. Now your macro could call a stored procedure (SP) (or you could just call the SP instead of the macro) and pass the SP the object name for Dynamic SQL function but as you know you cannot SELECT as answer set from an SP; you need a workaround.

What your 2nd example is going is reading the "object" macro parameter as a literal for the SELECT.



     
  <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