Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Triggers

Author  Topic 

hellohello
Starting Member

12 Posts

Posted - 2010-12-09 : 12:16:28
Can anyone answer these for me?? I need the IPO and Syntax?? Thank you

1. Write a trigger that will fire and cascade a delete of a customer through the ords table and the order details table. This trigger should send out a message telling the user of the number of orders that have been deleted for this customer.

2. Write a trigger that will fire and update the quantity in stock each time a line is inserted in the order details table for that product.

3. Write a trigger that will fire and update the order line price in the order details table and update the total order cost in the ords table any time that the price, quantity, or discount is changed in the order details table.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-12-09 : 12:18:41
start with the below. make a try and post if you face any problem

http://msdn.microsoft.com/en-us/library/ms189799.aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

hellohello
Starting Member

12 Posts

Posted - 2010-12-09 : 12:54:05
you dont fancy doing the actual questions if I tell you the tables????
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-12-09 : 12:56:42
why do you expect somebody to spoonfeed the solution? what will you gain out of it? Thats why its better to make yourself a try and then post doubts you come up with.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

blindman
Master Smack Fu Yak Hacker

2365 Posts

Posted - 2010-12-10 : 12:42:18
quote:
Originally posted by hellohello

you dont fancy doing the actual questions if I tell you the tables????


Would you like us to walk to your class and hand it in to your teacher too? That way you can sleep in, or play XBox or something.

________________________________________________
If it is not practically useful, then it is practically useless.
________________________________________________
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2010-12-10 : 12:48:03
who told you to use a trigger to send a message?

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page
   

- Advertisement -