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 |
|
Sonu619
Posting Yak Master
202 Posts |
Posted - 2011-05-18 : 13:47:05
|
| Hi Guys, Update help, Here is my dataID# VALUEC-1234 NULLM-3456 NULLAfter I run update statement end result should be like thisID# VALUEC-1234 M-3456M-3456 NULLThanks for Help. |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2011-05-18 : 14:03:33
|
| Is there some field in your table that orders the data? There has to be some way to determine that M-3456 is right "below" C-1234JimEveryday I learn something that somebody else already knew |
 |
|
|
Sonu619
Posting Yak Master
202 Posts |
Posted - 2011-05-18 : 14:25:12
|
| Here is my dataID# VALUE IDC-1234 NULL 1M-3456 NULL 2IF SOMETHING LIKE THIS THEN? |
 |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2011-05-18 : 15:08:46
|
| This will produce your original expected outputselect t1.ID#,t2.# as [Value] from yourTable t1left join yourTable t2 on t1.id = t2.id - 1JimEveryday I learn something that somebody else already knew |
 |
|
|
Sonu619
Posting Yak Master
202 Posts |
Posted - 2011-05-23 : 11:50:48
|
| Jim thanx for your help, Here is the situation and need your advise, I have sample data like thisID# VALUE IDC-1234 NULL 84M-3456 NULL 106Note:- ID column is not consistance. Please advise. |
 |
|
|
|
|
|