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 |
|
Sudha1234567
Starting Member
5 Posts |
Posted - 2009-09-01 : 04:56:18
|
| i has a table named temp with fieldsThe Temp Table is as BelowID NAME1 System12 System23 System34 System45 System56 NULLThe ID 6 Name has to be Updated wih the Next Maximum Least Value which has Name NOT NULLI has to update the name with System5 (by taking next maximum Least value of ID to the ID which name NULL)i.e (The ID 4 has name NULL and it has to take the next maximum Leastt value which has name Not NULL i.e ID 5 So it has to update the name as System5 for ID 6) can any one help me how can we approach this |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
Sudha1234567
Starting Member
5 Posts |
Posted - 2009-09-01 : 05:17:14
|
| The Topic which you shared is taking only the Nex Greates value.But i has to take the max Least value to update the nameCheck the topic which i createdit is entirely different from the topic which you shared |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-09-01 : 06:02:24
|
quote: Originally posted by Sudha1234567 The Topic which you shared is taking only the Nex Greates value.But i has to take the max Least value to update the nameCheck the topic which i createdit is entirely different from the topic which you shared
The logic is easily modified to suit your requirement. Have you tried anything so far?MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|