PayrollManagementSystem/db/queries/tplus/businesses.sql

19 lines
480 B
MySQL
Raw Normal View History

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