Поиск связанных документов
SELECT dc.CAPTION AS CLASS,
d.DOC_DATE,
d.DOC_NUMBER,
d.AMOUNT,
ds.CAPTION AS STATUS
FROM document d
JOIN DISPSTATUS ds ON ds.id = d.DISPSTATUS_ID
JOIN DOCUMENTCLASS dc ON dc.id = d.DOCUMENTCLASS_ID
WHERE parent_ID = 800122960493;
SELECT dc.CAPTION AS CLASS,
d.DOC_DATE,
d.DOC_NUMBER,
d.AMOUNT,
ds.CAPTION AS STATUS
FROM document d
JOIN DISPSTATUS ds ON ds.id = d.DISPSTATUS_ID
JOIN DOCUMENTCLASS dc ON dc.id = d.DOCUMENTCLASS_ID
WHERE parent_ID = 800122960493;
SELECT dc.CAPTION AS CLASS,
b.DOC_DATE,
b.DOC_NUMBER,
b.AMOUNT,
ds.CAPTION AS STATUS
FROM BUDGORDER b
JOIN DISPSTATUS ds ON ds.id = b.DISPSTATUS_ID
JOIN DOCUMENTCLASS dc ON dc.id = b.DOCUMENTCLASS_ID
WHERE b.BO_ID = 800020059813;
Комментарии
Отправить комментарий