FIX: StrToSet Function Returns Error Message when String is Over 1 K in Size

Article translations Article translations
Article ID: 275135 - View products that this article applies to.
This article was previously published under Q275135
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 11193 (PLATO 7.X)
Expand all | Collapse all

On This Page


Use of the Multi-Dimensional Expression (MDX) function StrToSet to convert a String to a Set results in an error if the string size is over 1 K.


Reduce the size of the input string for the StrToSet function to less than 1 K.


Microsoft has confirmed this to be a problem in SQL Server OLAP Services version 7.0. This problem has been corrected in U.S. Service Pack 3 for Microsoft SQL Server OLAP Services version 7.0. For information about how to download and install the latest SQL Server OLAP Services Service Pack, see the following Microsoft Web site:
For more information, contact your primary support provider.

This problem does not occur in Microsoft SQL Server 2000 Analysis Services version 8.0.


Steps to Reproduce the Behavior

  1. Run the MDX Sample Application.
  2. Connect to the Foodmart sample database.
  3. Run the following query from the MDX sample:
    Select StrToSet(
    "{,,,,,,,[N. vancouver],,[Oak Bay],[Port Hammond],,[Royal Oak],,,,,,[san Andres],[Santa Anita],[Santa Fe],,,,[Mexico City],,[La Cruz],,,,,,,,,[Beverly Hills],,,[Chula Vista],,,,[Daly City],,[El Cajon],,,,[Imperial Beach],[La Jolla],[La Mesa],,[Lemon Grove],[Lincoln Acres],[Long Beach],[Los Angeles],[Mill Valley],customers.city1.[National City],[Newport Beach]}") 
    on Columns from Sales
Expected results:

  • To accept a string of the input size.


  • To trap the error and return the appropriate error message, which indicates the string size limitation.
Observed results: Error messages similar to the following occur:
Memory could not be read.
Abnormal Program Termination
MDX syntax error.
Afterwards, the MDX sample is unstable and does not run another query until you restart the MDX Sample application.


Article ID: 275135 - Last Review: February 28, 2014 - Revision: 4.1
  • Microsoft SQL Server OLAP Services
kbnosurvey kbarchive kbbug kbcodesnippet kbfix KB275135

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from