Archives of the TeradataForum
Message Posted: Mon, 29 Jul 2002 @ 20:18:48 GMT
Is it possible using macros to pass in a table name as a parameter for use in a FROM clause?
During my ETL process I need to insert into a single table from multiple different source tables. These source tables are created by separate, unique ETL process that do not communicate between themselves, so a union type operation is not really an option here. But I was hoping that a single macro could be created and passed in the source table name as a parameter and thus allow me to only maintain one instance of the insert statement.
The macro code I was trying to run is:
CREATE MACRO DB.Insert_Macro(
I receive the following error message:
Code = 3707.
I am not very familiar with macros and am hoping to be missing something simple. But it appears the SQL code is being parsed at macro creation time instead of at macro execution time. Is this a correct understanding? Does anyone have a work around? Could stored procedures offer a solution (though I tried to with no luck)?
Thanks for any help!
|Copyright 2016 - All Rights Reserved|
|Last Modified: 23 Jun 2019|