scriptscribe
MIS
Hi all,
Someone loaded data into a table into the wrong column and I need to swap the data from Code into CodeDesc and from CodeDesc into Code.
My table looks like this:
PK HospFK Code CodeDesc
2091 1111 Self-Pay 0
2092 1111 Bad Debt A 5
2093 1111 Bad Debt NA 6
2094 1111 Bad Debt M 7
I know how to do a simple update query like this:
...but I don't know how to go about swapping the two.
Any help will be greatly appreciated.
Thanks,
Mike
Someone loaded data into a table into the wrong column and I need to swap the data from Code into CodeDesc and from CodeDesc into Code.
My table looks like this:
PK HospFK Code CodeDesc
2091 1111 Self-Pay 0
2092 1111 Bad Debt A 5
2093 1111 Bad Debt NA 6
2094 1111 Bad Debt M 7
I know how to do a simple update query like this:
Code:
UPDATE HospFinClassCodes
SET Code = CodeDesc
where HospFK = 1111
...but I don't know how to go about swapping the two.
Any help will be greatly appreciated.
Thanks,
Mike