Archives of the TeradataForum
Message Posted: Tue, 26 Sep 2006 @ 14:03:13 GMT
Subj: | | Re: Statistics expert needed |
|
From: | | Dempsey, Mike |
It may not be obvious but you can use SQL Assistant's 'Import' mode to run multiple statements like this.
Your import statement would be something like
COLLECT STATS ON ?
and each record of the import file would contain the rest of the statement (the part you would generate using the SQL or macros
provided.)
eg.
PhoneList COLUMN LastName
Employee COLUMN(EmpId,LastName)
etc.
This is a more generic method that the usual 'one value for one ?' substitution. You could still do that by generating a file containing 2
columns - TableName and Column name - but you would need to use separate statements for each variation (Column, Index, Multi-Column) so it might
be considered more complex. However it requires much less complex SQL to extract the Table/Column names than to build the actual (or partial)
statements.
Mike Dempsey
Teradata Client Tools
|