Archives of the TeradataForum
Message Posted: Sun, 23 Apr 2006 @ 18:51:30 GMT
Subj: | | Re: Updating dbc tables view comments from tablecommentstring |
|
From: | | Anomy Anom |
<-- Anonymously Posted: Sunday, April 23, 2006 11:37 -->
If you can figure out which views need comments updated and which table to copy those comments from (which would seem to be specific to your
environment, naming conventions, etc.) then you could write a stored procedure that queries DBC.Tables to get the CommentString value into a
variable, builds the
COMMENT ON viewname IS 'string';
statement, and executes that string dynamically via SysExecSQL.
You can't do this directly in a macro (no way to assign values to variables); but you could do it indirectly - have the macro build the COMMENT
ON statements, invoke that in a BTEQ export to temp file, then .RUN the resulting exported file of statements.
|