String Manipulation Functions

OLE DB Programmer's Reference

These are functions to convert to and from strings, sets, tuples, and members.

STRTOSET(<string>)

A set value expression that converts <string> into a set. The string must follow the same formatting rules as a set in MDX. Used to convert output from a user-defined function to a set usable in an MDX expression.

SETTOSTR(<set>)

Converts <set> to a string. The string is formatted as a set in MDX, using the unique names of the members or cells. Used to convert from a set to a string for input to a user-defined function.

STRTOTUPLE(<string>)

Converts <string> into a tuple. <string> must follow the same formatting rules as a tuple in MDX.

TUPLETOSTR(<tuple>)

Converts <tuple> into a string. The string is formatted as a tuple in MDX.

STRTOMEMBER(<string>)

Converts <string> into a member. <string> must be formatted as an MDX member.

MEMBERTOSTR(<member>)

Converts <member> to a string. The string is formatted as an MDX member.

SETTOARRAY(<set> [, <set>] [, <numeric expression>])

Converts one or more sets to an array for use in a user-defined function. The number of dimensions in the resulting array is the same as the number of sets specified.

The optional numeric expression can be used to provide the values in the array cells. If omitted, the default value of the set member is used for the array cell value.

The cell coordinates in the resulting array correspond to the position of the sets in the list. For example, SETTOARRAY(SA, SB, SC), where each set has two elements, produces the following three-dimensional array:

(SA1, SB1, SC1) (SA2, SB1, SC1) (SA1, SB2, SC1) (SA2, SB2, SC1) (SA1, SB1, SC2) (SA2, SB1, SC2) (SA1, SB2, SC2) (SA2, SB2, SC2)

The return type of SETTOARRAY is the VARIANT type VT_ARRAY. For that reason, the output of SETTOARRAY should be used only as input to a user-defined function.

1998-2001 Microsoft Corporation. All rights reserved.



Microsoft Ole Db 2.0 Programmer's Reference and Data Access SDK
Microsoft OLE DB 2.0 Programmers Reference and Data Access SDK (Microsoft Professional Editions)
ISBN: 0735605904
EAN: 2147483647
Year: 1998
Pages: 1083

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net