insert into employeefunctiondialog (employeefunction_id,dialog_id,selectable,systemuser_id,timestamp)
select e.employeefunction_id , d.dialog_id, 'Y', getminsystemuser(), getcurrentdatetime()
from employeefunction e, dialogs d
 where e.code = '-'  
 and d.code in ( 'WeighingTicket');
 