-- 20015498 (use of this script was obsolete)
/*
ALTER TABLE plantprocess MODIFY appservercluster_id number NULL;
ALTER TABLE plantprocess ADD  (applicationserver_id NUMBER);

alter table PLANTPROCESS
  add constraint PLANTPROCESS_APPSERV foreign key (APPLICATIONSERVER_ID)
  references APPLICATIONSERVER (APPLICATIONSERVER_ID);

UPDATE plantprocess p 
SET p.applicationserver_id = (SELECT MIN(ac.applicationserver_id) FROM appserverclustercontent ac WHERE ac.appservercluster_id = p.appservercluster_id)
WHERE p.applicationserver_id IS NULL;

COMMIT;

*/