salix/print/templates/reports/cmr/sql/signature.sql

5 lines
136 B
SQL

SELECT dc.id `signature`
FROM ticket t
JOIN ticketDms dt ON dt.ticketFk = t.id
LEFT JOIN dms dc ON dc.id = dt.dmsFk
WHERE t.id = ?