--Order 20014789 (Mat Chipping)

ALTER TABLE ROUTECONTROL
	ADD (NOOFCONNECTEDUSERS NUMBER  DEFAULT 0 NOT NULL);

ALTER TABLE ACTIVESTOCKDELIVERY
	MODIFY (FINISHINGMETHOD_ID NUMBER NULL);

INSERT INTO STAY
  (STAY_ID, STAYTYPE, STAYNR, FACTORYDESCRIPTION, SYSTEMUSER_ID, TIMESTAMP)
VALUES
  (SEQ_STAY.NEXTVAL, 1, 40, 'ON SHELF', GETMINSYSTEMUSER(), SYSDATE);

COMMIT;

INSERT INTO STAY_DESC
  (STAY_ID, LANGUAGE_ID, DESCRIPTION, SYSTEMUSER_ID, TIMESTAMP)
  SELECT STAY_ID,
         L.LANGUAGE_ID,
         FACTORYDESCRIPTION,
         S.SYSTEMUSER_ID,
         S.TIMESTAMP
    FROM STAY S,LANGUAGES L
    WHERE S.STAYTYPE = 1 AND S.STAYNR = 40;

COMMIT;