Datev Export sqlGetCounter Example
This is the main script, which is responsible for collection all the data, which needs to be exported.
Available Parameters
Example Usages
SELECT MAX(DatevExportId) FROM
(
SELECT ISNULL(MAX(cordDatevExportId), 0) AS DatevExportId FROM customerOrder WHERE cordCompanyId = @company
UNION ALL
SELECT ISNULL(MAX(sordDatevExportId), 0) AS DatevExportId FROM supplierOrder WHERE sordCompanyId = @company
) AS subLast updated