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 |
|
Frankp2112
Starting Member
4 Posts |
Posted - 2009-01-22 : 15:31:06
|
| Hi,I have a simple select statement with two values that me exclusie. So on the output I would like do sometyhing like this:select value1, value2 - where value1 is null and value2 is not null then insert value2 in the column for value1 from table1I hope this makes sense - Can anyone point me in the right direction to solve this problem.ThanksFrank |
|
|
sakets_2000
Master Smack Fu Yak Hacker
1472 Posts |
Posted - 2009-01-22 : 15:36:25
|
| [code]select isnull(value1,value2), value2from yourtable[/code] |
 |
|
|
Skorch
Constraint Violating Yak Guru
300 Posts |
Posted - 2009-01-22 : 16:34:02
|
| If you're looking to update your table:UPDATE YourTableSET value1 = value2WHERE value1 IS NULLAND value2 IS NOT NULL |
 |
|
|
|
|
|