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 |
|
outspaced
Starting Member
21 Posts |
Posted - 2007-01-26 : 06:39:45
|
Is this possible?i want something like:update _featured_options set Value = '15' WHERE OptionName = 'Bestsellers',Value = '16' WHERE OptionName = 'FeaturedRelease' ... except something that actually works.cheers,Alex |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-01-26 : 06:41:57
|
update 2 table ? ?update _featured_options set Value = case when OptionName = 'Bestsellers' then '15' case when OptionName = 'FeaturedRelease' then '16' else Value end Oops. KH |
 |
|
|
outspaced
Starting Member
21 Posts |
Posted - 2007-01-26 : 06:45:41
|
Doh! Sorry, I mucked up the subject. Silly me. Edited now.Anyway that query gives me an error:Server: Msg 156, Level 15, State 1, Line 3Incorrect syntax near the keyword 'case'. ... Hmmmm :o/ |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-01-26 : 06:58:10
|
updated the query KH |
 |
|
|
outspaced
Starting Member
21 Posts |
Posted - 2007-01-26 : 07:31:12
|
| Works great, thanks! |
 |
|
|
|
|
|