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.
| Author |
Topic |
|
wormz666
Posting Yak Master
110 Posts |
Posted - 2010-03-08 : 20:28:59
|
| update table1 set field1=@field1 where prifield in(Select prifield from table2 where stat='Deactivated')i' having an error on it... to many row's affected....finding the truthmaking a maze on my mind.... |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2010-03-08 : 20:44:48
|
run this and see what are the extra rows that you do not want to update it and add the condition accordingly to the WHERE clauseselect *from table1where prifield in(Select prifield from table2 where stat='Deactivated') KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
wormz666
Posting Yak Master
110 Posts |
Posted - 2010-03-09 : 00:01:46
|
| i want to update many row... as a transaction been related to the primary key...finding the truthmaking a maze on my mind.... |
 |
|
|
wormz666
Posting Yak Master
110 Posts |
Posted - 2010-03-09 : 00:03:03
|
| i know which field should i update... the related row and and its status should be deactivated...finding the truthmaking a maze on my mind.... |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2010-03-09 : 00:14:18
|
can you post some sample data and explain the problem you are facing ? KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
|
|
|