Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

swap value in one column Expand / Collapse
Author
Message
Posted Friday, June 24, 2011 7:56 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, December 11, 2014 2:53 PM
Points: 4, Visits: 16
Is there a quick way to swap a set of values in one column?
I have labels that need to be swapped:

OLD NEW
Axis Index Label Axis Index Label
X 0 A X 0 1
X 1 B X 1 2
X 2 C X 2 3
Y 0 1 X 3 4
Y 1 2 Y 0 A
Y 2 3 Y 1 B
Y 3 4 Y 2 C

I can't switch the axis because ther are other columns that need to remain with the axis.
Do I have to create a temporary table to store one set of data, then update the other set and then replace the first set with the temporary data or is there an easier way to do this?

Thanks

Post #1131153
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse