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
 trigger needed

Author  Topic 

turj
Starting Member

6 Posts

Posted - 2007-12-03 : 14:00:48
I'm new to sql server (2000)
and I have to make some trigger before it will be too late :(
I don't have much time to learn it right now. but I'll defiantly do this some time.

I have 2 tables. tbl_A and tbl_B . in tbl_A I have a field named 'money'
and another field 'name' .I need to make a trigger that will run whenever the money field updated.
the update should be like that:
10% of the money that are in the update statement goes to every row in tbl_A where name='<name that used in update query>'. in addition, the 10% and the name goes to tbl_B

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-12-03 : 14:02:56
Show us what you have tried so far.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

dinakar
Master Smack Fu Yak Hacker

2507 Posts

Posted - 2007-12-03 : 14:07:45
quote:
Originally posted by tkizer

Show us what you have tried so far.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/



Tara
You are asking that even after reading this?

quote:
Originally posted by turj

I don't have much time to learn it right now.




Dinakar Nethi
************************
Life is short. Enjoy it.
************************
http://weblogs.sqlteam.com/dinakar/
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-12-03 : 14:12:22
Yes since we'll only help with homework questions once the poster has shown some effort.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -