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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TRIGGER in SQL SERVER

Status
Not open for further replies.

crazydeveloper

Technical User
Apr 20, 2001
5
0
0
SG
hi friends,

pl. help me writing the Trigger while inserting into the table.


the tables look like this,

EMP_Table Finance_Table Marketing_Table


when i am inserting into emp_talbe, columns like this
empid,ename,dname,sal etc.

values(1,'SQL','Finance',1000)
values(2,'SERVER','Marketing',2000)

if dname finance i want to insert the related values into Finance and if it's marketing i want to insert into the Marketing table.

for inserting into 3 tables i want to write a trigger and while inserting i want to check the value of the dname then i want to insert the same into appropiate table.


thanks in advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top