Link to home
Start Free TrialLog in
Avatar of bolicat
bolicat

asked on

insert fucntion to trigger

I need to modify all my triggers wiht the following criteria inserting the
follwoing  fucntion :
   
vFunction = "dbo.f_ch_to_x"

Using criteria.

        select * from INFORMATION_SCHEMA.COLUMNS  
                  "where is_Nullable = 'YES'
                  "and Data_Type = 'char'
                  "and Table_Name Like 'vPER_%'
                  "order by column_name "

What will be the best way to do that.

Avatar of JesterToo
JesterToo
Flag of United States of America image

I'd suggest exporting all the trigger scripts out to a text file (with the drop/create syntax) then running the resulting file through any scriptable editor that you may be familiar with to insert the statement in the appropriate locations.  FInally, AFTER THROUGH REVIEW, run the resulting edited file back into SQL Server via Query Analyzer.  Be certain to keep a copy of the original script file before the edits are performed just in case something messes up.

HTH,
Lynn
ASKER CERTIFIED SOLUTION
Avatar of JesterToo
JesterToo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bolicat
bolicat

ASKER

I will going to try to download the EM keep you posted.

Thanks
Avatar of bolicat

ASKER

I finally got my registration from the link suggested, what is the applicant name?
I believe the comments I provided earlier are the easiest solution to this question since there is no tool available to make the desired modifications directly to the sprocs "en masse".