Set Field_2 = Case When Field_1 = x Then n Else NULL End
-George
Microsoft SQL Server MVP My Blogs SQLCop twitter
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
If you are just trying to retrieve data a certain way, use DaveInIowa's suggestion.
If you are trying to update data in a table, use gmmastros' suggestion as part of an update statement.
-SQLBill
The following is part of my signature block and is only intended to be informational.
Posting advice: FAQ481-4875
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.