ODBC Driver for Smaregi

Build 23.0.8839

ProductInventoryReservations

商品情報:在庫引当商品

Select

本製品 は Smaregi API を使用して、WHERE 句条件と選択されたカラムを処理します。LIKE(date およびdateTime データ型のカラムの場合)およびIN 演算子は、クライアント側で処理されます。 =、!=、<>、>、<、>=、<=、AND、LIKE、ORDER BY 演算子は、サーバー側で処理されます。 例えば、次のクエリはサーバー側で処理されます。

SELECT ReservationAmount FROM ProductInventoryReservations

SELECT * FROM ProductInventoryReservations WHERE ReservationProductId <= 1005;

Insert

ProductInventoryReservation を追加するには、すべてのフィールドを指定します。

INSERT INTO ProductInventoryReservations (ProductId, ReservationProductId, ReservationAmount) VALUES (1005, 4, 5)

NOTE:レコードがすでに存在する場合、挿入は成功せず、ドライバーは影響を受けた行を0 行返します。

Upsert

ProductInventoryReservation を追加 / 更新するには、すべてのフィールドを指定します。

UPSERT INTO ProductInventoryReservations (ProductId, ReservationProductId, ReservationAmount) VALUES (1005, 4, 5)

Bulk Upsert

複数のProductInventoryReservation を追加 / 更新するには、すべてのフィールドを指定します。

INSERT INTO ProductInventoryReservations#TEMP (ProductId, ReservationProductId, ReservationAmount) VALUES (7, 4, 5)
INSERT INTO ProductInventoryReservations#TEMP (ProductId, ReservationProductId, ReservationAmount) VALUES (9, 4, 5)
UPSERT INTO ProductInventoryReservations (ProductId, ReservationProductId, ReservationAmount) SELECT ProductId, ReservationProductId, ReservationAmount FROM ProductInventoryReservations#TEMP

Update

スマレジはReservationAmount カラムの更新を許容します。

UPDATE ProductInventoryReservations SET ReservationAmount = 2 WHERE ProductId = 1005 AND ReservationProductId = 15

Delete

ProductInventoryReservations は、ProductId およびReservationProductId を指定することで削除できます。

DELETE FROM ProductInventoryReservations WHERE ProductId = 1005 AND ReservationProductId = 15

Bulk Delete


INSERT INTO ProductInventoryReservations#TEMP (ProductId, ReservationProductId) VALUES (9, 4)
INSERT INTO ProductInventoryReservations#TEMP (ProductId, ReservationProductId) VALUES (4, 4)
DELETE FROM ProductInventoryReservations WHERE EXISTS SELECT ProductId, ReservationProductId FROM ProductInventoryReservations#TEMP

Columns

Name Type ReadOnly References Description
ProductId [KEY] Long False

Products.ProductId

商品ID (PK) : 数字15桁以内。商品IDは必ず設定してください。

ReservationProductId [KEY] Long False

引当商品商品ID (PK) : 数字15桁以内。引当商品商品IDは必ず設定してください。

ReservationAmount Integer False

引当数 : 数字3桁以内。引当数は必ず1以上で設定してください。

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839