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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 updating multiple tables

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-08-16 : 09:31:20
Bhavesh writes "how to write one query for uapdating multiple tables ?"

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2006-08-16 : 09:34:33
You can not update the multiple table using one update statement. you need to do via multiple update statment.

or you can club all the update statements in one procedure or do it via triggers.

Chirag
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-08-16 : 11:25:44
create a view joining the tables and use instead of trigger to perform the actual update of the table


KH

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-08-16 : 12:08:32
quote:
Originally posted by khtan

create a view joining the tables and use instead of trigger to perform the actual update of the table


KH




That also needs seperate update statements


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-08-16 : 12:20:19
quote:
Originally posted by madhivanan

quote:
Originally posted by khtan

create a view joining the tables and use instead of trigger to perform the actual update of the table


KH




That also needs seperate update statements


Madhivanan

Failing to plan is Planning to fail



Yup. At least he can use single update query on the view


KH

Go to Top of Page
   

- Advertisement -