REPLACING OR CREATING MULTIPLE MACROS

Database
Fan

REPLACING OR CREATING MULTIPLE MACROS

Is there a way to replace multiple macros at a time?

I tried in SQL Assistant to run all three of the following replace macro statements together with one press of the double or the multiple feet. Got this error: 3932: Only an ET or null statement is legal after a DDL Statement.
Output directed to Answerset window

replace macro mydatabase_mymacros.macro1
AS
(SELECT * FROM DBC.TABLES
WHERE TABLENAME = 'TABLE_1';);

replace macro mydatabase_mymacros.macro2
AS
(SELECT * FROM DBC.DATABASES
WHERE DATABASENAME = 'DATABASE_1';);

replace macro mydatabase_mymacros.macro3
AS
(SELECT * FROM DBC.ROLEINFO
WHERE ROLENAME = 'ROLE1';);

Thanks for help.
2 REPLIES
Enthusiast

Re: REPLACING OR CREATING MULTIPLE MACROS

Since macro definition statements are DDL, they are not allowed in multi-statement requests, nor are multiple DDL statements allowed in one transaction.
Fan

Re: REPLACING OR CREATING MULTIPLE MACROS

Thanks for that information. My question is why does SQL Asst allow multiple views to be replaced at one time then?