Postman collection
Suppliers Read

pixiReadDeliveryItems

Returns delivery item rows from SDelDetail, filtered by creation and/or update date and paged by key in ascending order.

Reads delivery item rows (table SDelDetail) and returns at most @RowCount rows, always sorted by SDelDkey ascending.

Preparation:

  • If SDelDkey is NULL it is set to 0.
  • If RowCount is NULL it is set to 1000.

Only one filter mode is applied. The procedure checks the modes in this order and uses the first one that matches:

  1. Create or update date: CreateAndUpdateDateFrom and/or CreateAndUpdateDateTo is set. A row matches the lower bound if its creation date or its update date is >= the From value. It matches the upper bound if its creation date or its update date is < the To value.
  2. Create date: CreateDateFrom and/or CreateDateTo is set. The filter uses SDelDcreateDate >= From and SDelDcreateDate < To.
  3. Update date: UpdateDateFrom and/or UpdateDateTo is set. The filter uses SDelDupdateDate >= From and SDelDupdateDate < To.
  4. Key range: no date parameter is set. The call returns the next rows after SDelDkey.

In every mode only rows with SDelDkey > @SDelDkey are returned. To page through the data, pass the highest SDelDkey of the previous response as SDelDkey in the next call. Stop when fewer than RowCount rows come back.

The upper bounds of the date ranges are exclusive. Parameters of a lower-priority mode are ignored when a higher-priority mode is active.

Notes

  • All reads use WITH (NOLOCK). Uncommitted data can be returned, and rows can be missed or appear twice while data is being changed.
  • SDelDkey is always used as an exclusive lower bound (>). Passing a specific key does not return that row; it returns the rows after it. The code has a branch for an exact key lookup and an empty-result branch, but neither can be reached, because SDelDkey and RowCount are never NULL after the preparation step.
  • In the combined create/update mode, the From and To checks are evaluated independently. A row can match the From bound through one date and the To bound through the other date. For example, a row created before To and updated after To is still returned.
  • A negative RowCount causes a SQL error in TOP. RowCount = 0 returns no rows.

Tables used

SDelDetail · Read
SQL object:
dbo.pipiReadDeliveryItems
Updated at 2026-10-30