--order 502624

insert into stay
  (stay_id, staytype, staynr, factorydescription, systemuser_id, timestamp)
values
  (seq_stay.nextval, 1, 39, 'Bundle Scan', getminsystemuser(), sysdate);

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 = 39;