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 |
|
ramoneguru
Yak Posting Veteran
69 Posts |
Posted - 2006-07-06 : 14:38:28
|
| Ok, I'm somewhat lazy and I have this problem:I have a bunch of codes that I need to lookup using this query:SELECT OptionCode, TestName, NewCode FROM AssessmentWHERE TestName = 'Math'Output looks like this:123 Math 1234 Math 1456 Math 1789 Math 1...Now I have to update the 'NewCode' to the number 116 (it currently is 1) but I'm using this update statment:UPDATE AssessmentSET NewCode = 116WHERE TestName = 'Math'AND OptionCode IN (123,234,456,789,...)I cut/paste the OptionCode from the grid, but manually typed in the comma (numbers are non sequential). Is there a way I can insert a comma so all I need to do is just cut/paste and not manually type anything?--Nick |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
ramoneguru
Yak Posting Veteran
69 Posts |
Posted - 2006-07-06 : 15:13:56
|
| Sweeeeeeeet, thanks.--Nick |
 |
|
|
|
|
|