取得したレコードの一意性を指定するために使用します。
構文
For Each コマンド (X Evolution 2) および Xfor Each コマンド:
Option Distinct
Data Provider オブジェクト内:
GroupName [ Distinct ]
説明
この節を使用すると、For each コマンドおよび Data Provider オブジェクトは、参照される項目属性の値セットが一意であるレコードのみを返します。
distinct 節に含まれる項目属性は、for each コマンド内で参照されるものであり、これには次の項目属性が含まれます: Where 節、Defined By 節の項目属性。また、拡張テーブルにナビゲートするために必要な項目属性。
例
次のように、For Each コマンドを定義したとします:
For Each
Defined by InvoiceDate
option Distinct
&CustomerName = CustomerName
EndFor
これは、次のデータプロバイダーと同じです:
Customers
{
Customer Distinct
Defined by InvoiceDate
{
CustomerName
}
}
この結果は、異なる Customer Name のリストになります。
注
For Each および XFor Each コマンド内で、この節を指定できるのは、For Each、Where、Defined by コマンドの直後のみです。
適用範囲
参考情報
For Each コマンド (X Evolution 2) Xfor Each コマンド
|