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

???Multiple table update???

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I need to update several tables where the same condition is met.

Ex. Update 1, 2, 3 Set Number = Number + 1 where
"THIS IS WHERE I GET LOST"
condition = same in all tables

I have tried severeal different ways with no luck. I believe my concept is correct, just lacking very much in the syntax department.

Thanks in advance for any help.

Mark




 
Just do it like this

UPDATE MyTable
Set MyField = MyField + 1
Where MyField Like '%jazz'
GO
UPDATE MyTable1
Set MyField1 = MyField1 + 1
Where MyField1 Like '%jazz'
GO
UPDATE MyTable2
Set MyField2 = MyField2 + 1
Where MyField2 Like '%jazz'
GO
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top