27 lines
675 B
SQL
27 lines
675 B
SQL
-- 已在客户备份核对列结构;业务语义仍待确认。
|
|
-- SQL Server 2008 R2 语法;主键游标分页,时间水位尚未启用。
|
|
SELECT TOP (:batch_size)
|
|
b.ID AS id,
|
|
b.code AS code,
|
|
b.ID AS line_no,
|
|
b.idSaleDeliveryDTO AS source_parent_id,
|
|
b.idinventory,
|
|
b.saleOrderId,
|
|
b.saleOrderDetailId,
|
|
b.quantity,
|
|
b.baseQuantity,
|
|
b.price,
|
|
b.taxPrice,
|
|
b.taxAmount,
|
|
b.costPrice,
|
|
b.costAmount,
|
|
b.CostPriceGetType,
|
|
b.returnQuntity,
|
|
b.backSentQuantity,
|
|
b.isCancel,
|
|
b.updated AS source_updated_at,
|
|
b.ts AS source_rowversion
|
|
FROM dbo.SA_SaleDelivery_b AS b
|
|
WHERE b.id > :after_id
|
|
ORDER BY b.id;
|