Executing Statements Before or After Creation of Functions or Procedures

From DBArtisan
Jump to: navigation, search

Go Up to Using the Schema Migration Wizard

During migration, it can be necessary to have statements executed before and after creation of the procedure or function. This can be useful for example, if you need to create or drop temporary tables used by the function or procedure. DBArtisan supports the use of two tag pairs, ETStart and ETEnd, that let you embed statements in the first comment block of a stored procedure or function. The following shows the expected syntax:

create procedure dbo.procname(@a numeric) as

/*

<ETStart>SQL Statement</ETStart>

<ETEnd>SQL Statement</ETEnd>

*/

begin

...