PayrollManagementSystem/db/queries/tplus/shipments.sql

24 lines
590 B
SQL

-- 已在客户备份核对列结构;业务语义仍待确认。
-- SQL Server 2008 R2 语法;主键游标分页,时间水位尚未启用。
SELECT TOP (:batch_size)
h.ID AS id,
h.code AS code,
h.voucherdate,
h.SendDate,
h.deliveryDate,
h.auditeddate,
h.SourceVoucherCode,
h.SaleOrderCode,
h.idcustomer,
h.idclerk,
h.amount,
h.taxAmount,
h.voucherState,
h.isCancel,
h.isCounteractDelivery,
h.updated AS source_updated_at,
h.ts AS source_rowversion
FROM dbo.SA_SaleDelivery AS h
WHERE h.id > :after_id
ORDER BY h.id;