CREATE SET

The CREATE SET statement allows the creation of user-defined sets.

You can define a set for use by a single query with the WITH clause in the SELECT statement, or for use in multiple queries in a session with the CREATE SET statement. For more information about WITH, see Using WITH to Define Calculated Members, Sets, and Cache.

BNF

<create-set-statement> ::= CREATE <optional-scope> <create-set-subset> [<create-set-subset>...]

<create-set-subset> ::= SET <cube-name>.<set-name> AS '<set-expression>'

<optional-scope> ::= <empty> | SESSION

Remarks

The <set-expression> value can contain functions that support multidimensional expressions (MDX) syntax.

Sets created with CREATE SET without an <optional-scope> value have session scope.

Scope

A user-defined set can occur within one of three scopes:

(c) 1988-1998 Microsoft Corporation. All Rights Reserved.