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 |
|
joriveek
Starting Member
33 Posts |
Posted - 2006-04-10 : 11:15:58
|
| Hi Experts,I am looking for an intelligent SQL UPDATE Statement in SQL ServerMy problem is: I have the table as follows:===================Description | Rate | Item====================I have three fields above in a tableI want to set Item to a value based on the WHERE search criteria of first two fields. None of them guarrantee uniquenessData Case 1)Desc1 200 Desc2 200In this case I need to set one row ITEM as Say 99.99 (suppose I can do this with UPDATE TOP(1) no problemData Case 2)Desc1 200Desc2 300In this case I need to set all or some rows ITEM depends on the data arrive. I cannot use TOP(1) here because it could be all of them,How can I deal with this situation? |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-04-10 : 11:18:09
|
| a bit vague but try exploring instead of triggers oryou can validate and manipulate your data in your application before saving it into the tableHTH--------------------keeping it simple... |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-04-10 : 11:21:43
|
Can you explain what are you trying to achieve here. And also post more sample data with the required result with more explaination please ? KH |
 |
|
|
|
|
|