Excel Add-In for Smaregi

Build 26.0.9770

Categories

Returns a list of product categories.

テーブル固有の情報

SELECT

本製品 は Smaregi API を使用してWHERE 句条件を処理します。すべてのカラムは=、!=、>、<、>=、<= 演算子によるサーバー側フィルタリングをサポートし、文字列型のカラムはLIKE もサポートします。IN 演算子、およびdate/datetime 型のカラムに対するLIKE 演算子は、クライアント側で処理されます。

例えば、次のクエリはサーバー側で処理されます:

SELECT CategoryName, CategoryCode FROM Categories ORDER BY CategoryCode

INSERT

Categories を追加するには、CategoryId、CategoryCode およびCategoryName フィールドを指定します。

INSERT INTO Categories (CategoryId, CategoryCode, CategoryName) VALUES (10, 'CategoryCode10', 'CategoryName10')

Note: 同じCategoryId を持つレコードが既に存在する場合、挿入は失敗し、ドライバーは影響を受けた行数として0 を返します。

UPSERT

Categories を追加または更新するには、CategoryId、CategoryCode およびCategoryName フィールドを指定します。

UPSERT INTO Categories (CategoryId, CategoryCode, CategoryName) VALUES (6, 'CategoryCode', 'CategoryName')

Bulk UPSERT

複数のCategories を追加または更新するには、CategoryId、CategoryCode およびCategoryName フィールドを指定します。

INSERT INTO Categories#TEMP (CategoryId, CategoryCode, CategoryName) VALUES (11, 'CategoryCode11', 'CategoryName11')
INSERT INTO Categories#TEMP (CategoryId, CategoryCode, CategoryName) VALUES (12, 'CategoryCode12', 'CategoryName12')
UPSERT INTO Categories (CategoryId, CategoryCode, CategoryName) SELECT CategoryId, CategoryCode, CategoryName FROM Categories#TEMP

UPDATE

Smaregi はCategoryCode、CategoryName、CategoryAbbr、CategoryGroupId、ParentCategoryId、DisplaySequence、DisplayFlag、PointNotApplicable、TaxFreeDivision、Color およびTag カラムの更新を許可します。

UPDATE Categories SET CategoryCode = 'CatCode', CategoryName = 'Updated', CategoryAbbr = 'CatAbbr', CategoryGroupId = 2, ParentCategoryId = 1, DisplaySequence = 1, DisplayFlag = 0, PointNotApplicable = 1, TaxFreeDivision = 1, Tag = 'test' WHERE CategoryId = 13

DELETE

Categories を削除するには、CategoryId を指定します。

DELETE FROM Categories WHERE CategoryId = 2

Bulk DELETE


INSERT INTO Categories#TEMP (CategoryId) VALUES (11)
INSERT INTO Categories#TEMP (CategoryId) VALUES (12)
DELETE FROM Categories WHERE EXISTS SELECT CategoryId FROM Categories#TEMP

Columns

Name Type ReadOnly References Description
CategoryId [KEY] Integer False

CategoryCode String False

CategoryName String False

CategoryAbbr String False

CategoryGroupId Integer False

ParentCategoryId Integer False

Level Integer True

DisplaySequence Integer False

DisplayFlag Integer False

PointNotApplicable Integer False

TaxFreeDivision Integer False

Color String False

Tag String False

InsDateTime Datetime True

UpdDateTime Datetime True

Copyright (c) 2026 CData Software, Inc. - All rights reserved.
Build 26.0.9770