Dhehien
asked on
Combining two update queries
Hi,
Can anybody help me....I have data in a column which contain:
Fulltime
Fultime
Fulltime
Partime
Partime
Now I want to change all fulltime words with Waiting and partime words with Placed.
Do you know how to do this?
Can anybody help me....I have data in a column which contain:
Fulltime
Fultime
Fulltime
Partime
Partime
Now I want to change all fulltime words with Waiting and partime words with Placed.
Do you know how to do this?
update <tablename>
set <columnname> =
case <columnname>
when 'Fulltime' then 'Waiting' when 'Partime' then 'Placed'
End
set <columnname> =
case <columnname>
when 'Fulltime' then 'Waiting' when 'Partime' then 'Placed'
End
ASKER
It doesn't work, it says "cannot update (column_name) to null"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks heaps, It works!!!!
ASKER
Awesome
ASKER
Hi...the data in the column that just changed was created from other table, apparently it also change the original data. Is there anyway to avoid this?
Open in new window