Archives of the TeradataForum
Message Posted: Wed, 19 Jul 2006 @ 22:40:59 GMT
Hi. I'm new to this group, although I have been using Teradata (as a developer) for years. My experience until now has basically been running select queries. Now, on my new project, I'm responsible for ~70 macros which I didn't write.
My first task will be to update all these macros, substituting a new database view for the existing one. I'm wondernig if there's any way within Queryman to do a global edit, rather than bring each macro in turn into the SQL window, editing it (and replacing create macro with replace macro if necessary), and running it. Is there a way to modify all of them in a single command or script?
The one idea I had is the following -- can anyone suggest something better:
Let's say I create a text file Notepad that has all my macros concatenated together, like this:
replace macro AAA as ( aaa; ); replace macro BBB as ( bbb; ); replace macro CCC as ( ccc; );
I would create the text file by displaying each of the macros in turn in Queryman, and then doing a Copy to Notepad, and then copying it from here to the 'master' text file.
I would do some global edits (Replace All) on the file, such as 'create macro' ? 'replace macro', and also substituting the name of the View throughout.
Then I could take this text file and copy it into the SQL window of Queryman and click on Execute, which would execute everything in the window, all 70 replace statements.
Thanks in advance.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|