|
|
Archives of the TeradataForum
Message Posted: Tue, 06 Dec 2005 @ 15:13:58 GMT
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.
| |