Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trigger question

Status
Not open for further replies.

sujosh

Programmer
Joined
Nov 29, 2001
Messages
93
Location
US
How do I see the trigger I created on a table using sql query analyzer. I used to do a sp_help on sqlserver7 and could see all of them. But with sql server 2000 I dont get the trigger systax when I do sp_help

ANy reasons?
Thanks
 

I don't know if there is a stored procedure to do this but you can find the text of triggers in syscomments.

Select o.name, c.text
from syscomments c
inner join sysobjects o
on c.id=o.id
where o.type='tr'

Make sure you have set the Maximmum characters per column on the Query Analyzer options (Results tab) to a large value such as 8192 in order to display all of the TEXT.
Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Thanks Terry!!

Really appreciate it.
 
sp_helptext?

Syntax
sp_helptext [ @objname = ] 'name'

Prints the text of a rule, a default, or an unencrypted stored procedure, user-defined function, trigger, or view.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top