0
When a Trigger is compiled by TOAD for SQL, using the F9 button and not F5, it is inserted into syscomments with wrong formatting, as if it were a single line, where line breaks are disregarded. The problem is that when using sp_helptext to bring the text of the object, it searches in syscomments and consequently the result are broken lines without the slightest sense, and I can’t use this text to recompile the object.
If you access SQL Management Studio and do the following procedure on Trigger that was compiled with F9 in TOAD for SQL:
To modify a DML trigger Object Researcher, connect to an instance of the Database Mechanism and expand it. Tables and expand the table that contains the trigger you want to modify. Triggers, right-click the trigger to be modified and click Modify. Execute.
It opens a text editor with the correctly formatted Trigger.
My question is to find out what this SQL Manegement Studio Modify option performs so that you can format the object correctly. Because I need to take what sp_helptext brings, format in the right way, to be able to create this Rigger in another table.
Jean, bring Trigger in one line, because in sys.sqlmodules it is already like this, and in syscomments tbm, which is where SP_HELPTEXT picks up. It would be good to find out what the damn SQL Management Modify function does underneath the cloths that can bring it formatted properly.
– Robson Braz