Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
| Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old May 17th, 2005, 11:49 PM
Registered User
 
Join Date: May 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Can trigger call store procedure ?

Can i create trigger call store procedure ?.if can please show me how i do that

thank you every body for help. :D

  #2 (permalink)  
Old May 18th, 2005, 09:58 AM
Friend of Wrox
 
Join Date: Jan 2004
Location: , , USA.
Posts: 303
Thanks: 0
Thanked 0 Times in 0 Posts
Default

you mean calling a stored procedure within a trigger

You can...but ask yourself two times you really wanted to do that

an example from BOL, it uses xp_sendmail extended stored procedure

USE pubs
IF EXISTS (SELECT name FROM sysobjects
     WHERE name = 'reminder' AND type = 'TR')
DROP TRIGGER reminder
GO
CREATE TRIGGER reminder
ON titles
FOR INSERT, UPDATE, DELETE
AS
EXEC master..xp_sendmail 'MaryM',
     'Don''t forget to print a report for the distributors.'
GO


Similar Threads
Thread Thread Starter Forum Replies Last Post
Store procedure help ??? RinoDM SQL Server 2000 8 May 1st, 2008 03:03 PM
Store Procedure sureshyuga SQL Server 2000 0 May 18th, 2007 01:49 AM
Creating stored procedure with trigger (HOWTO ..) AzlanAziz SQL Language 0 January 16th, 2007 04:34 AM
How do I Call store procedure kau_shuk VS.NET 2002/2003 1 September 7th, 2006 08:09 PM
stored procedure problem with trigger helkayal SQL Server 2000 5 February 22nd, 2005 12:59 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.