It is quite simple.
Update your Work Center Table.
You should not delete the "OLD" work centers, because you are not updating history.
Cann't be done while people is using the system.
You should not update work orders that are on the floor ("Released" status "R")
Backup, and backup your backup : ROUTING, ROUTTEMP, and WOROUT.
Test it on a play company !!! Here is the sql statements:
UPDATE ROUTING SET MTRO_WC = 'NEW WC' WHERE MTRO_WC = 'OLD WC';
UPDATE ROUTTEMP SET MTRO_WC = 'NEW WC' WHERE MTRO_WC = 'OLD WC';
If you want to update all work orders regardless of Status ("Released") :
UPDATE WOROUT SET MTWORO_WC = 'NEW WC' WHERE MTWORO_WC = 'OLD WC';
Now if you don't want to update the ones on the "floor". It is a different statement :
UPDATE WOROUT SET MTWORO_WC = 'NEW WC'
FROM WORKORD
WHERE WORKORD.MTWO_WIP_WOSUF = WOROUT.MTWORO_WOSUF
AND WORKORD.MTWO_WIP_WOPRE = WOROUT.MTWORO_WOPRE
AND WORKORD.MTWO_WIP_STATUS <> 'R'
AND WOROUT.MTWORO_WC='OLD WC' ;
You need to run each sql statement for each "OLD Work Center", unless there is something common among them: check previous posting (Lynn)
Example:
UPDATE ROUTING SET MTRO_WC = 'LATHES' WHERE MTRO_WC LIKE 'LAT%';
Have fun,
Kelloggs
Disclaimer: I accept no liability for the content of this post, or for the consequences..... Please test it on a play company!!!!