Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Sun, 23 Apr 2006 @ 18:51:30 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


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.



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023