SQL. Заполнение журнала обработки документов
Скрипт для получения другого скрипта (insert): SELECT 'Insert into taskjournal (ID,ACTION_DATE,URL,TASK_TIME,PROCESSOR_NAME,SPECIFICATION,ACTION_NAME,COMPLETED,EVENT_TYPE,VERSION,SYSUSER_ID,BUDGET_ID,SERVER_HOST,SERVER_PORT,CLIENT_HOST,CLIENT_PORT) values (' ||d.TASKJOURNAL_ID|| ', to_date (''' ||d.WORK_DATE|| ''', ''DD.MM.YY''),' ||d.TASKJOURNAL_ID|| ',''1'',''DOCUMENT'',null,''process'',''1'',''0'',''1'',''-99999'',''1'',''myserver'',''2091'',''myserver'',''2091'');' FROM DOCJOURNAL d LEFT JOIN TASKJOURNAL t ON t.id = d.TASKJOURNAL_ID WHERE t.ID IS NULL --AND d.DOCUMENT_ID = 13881756 AND d.dispstatus_id = 2 AND d.action_name = 'process' AND WORK_DATE > to_date ('01.06.2021', 'DD.MM.YYYY');