Archives of the TeradataForum
Message Posted: Tue, 07 Aug 2007 @ 14:21:19 GMT
When using a macro to create a table, is there any way of adding a date suffix to the table name?
I know that you can't use a parameter in the create table script, so I was wondering if there is any other way of doing it.
The current macro that creates the table:
create macro xtest (med int) as ( create table mb_table_test as ( select min(month_end_dt) as month_end_dt from account_history where (external_status_cd is null or external_status_cd not in ('C', 'L', 'U','Z')) and month_end_dt >= :med )with data; ) ;
When executed with the following - exec xtest(1070430);, I'd like the table name to be mb_table_test_1070401.
Is this possible?
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|