@SUBSTRING

Returns the requested string of characters from an existing source string. The source string can be a text string or a member name, or it can result from a specified function that returns a text string or a single member name.

Syntax

@SUBSTRING (String, StartPosition [, EndPosition])

String A string or a function that returns a string or a single member name (For example, @ATTRIBUTESVAL, @CONCATENATE, and @NAME return strings.)
StartPosition Beginning character position within String to include in the substring. An integer greater than or equal to 0, where 0 corresponds to the first character in String, 1 corresponds to the second character, and so on.
EndPosition Optional. The first position past the last character to be included in the substring. An integer greater than or equal to 0, where 0 corresponds to the first character in String, 1 corresponds to the second character, and so on. If EndPosition is not specified or is less than StartPosition, Analytic Services returns all remaining characters from the source string.

Example

The following examples are based on the Sample Basic database:

Function statement Result
@SUBSTRING ("100-10",1) "00-10"
@SUBSTRING ("200-21",0,2) "200"
@SUBSTRING (@Name(@Parent(Jan)),3)
(The parent of Jan is Qtr1.)
"1"

See Also

@CONCATENATE
@MEMBER

©2004 Hyperion Solutions Corporation. All Rights Reserved.
http://www.hyperion.com