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 |
|
rajeshforum
Starting Member
3 Posts |
Posted - 2007-08-23 : 05:29:42
|
| Hi all!how to interchange two row values? ID NAME 1 DotNet 2 Java 3 DotNet 4 Javathis s the sample table..here i want to interchange java to dotnet and vice versa.rajesh |
|
|
Koji Matsumura
Posting Yak Master
141 Posts |
Posted - 2007-08-23 : 05:47:14
|
| UPDATE YourTable SET Name = CASE Name WHEN 'DotNet' THEN 'Java' WHEN 'Java' THEN 'NotNet' END |
 |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2007-08-23 : 07:32:56
|
| Step 1: Normalize your tablesStep 2: All following steps will be that much easier.[Signature]For fast help, follow this link:http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspxLearn SQLhttp://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
 |
|
|
|
|
|