dbTalk Databases Forums  

LookupCube: Unexpected Results with StrToSet

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss LookupCube: Unexpected Results with StrToSet in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
John
 
Posts: n/a

Default LookupCube: Unexpected Results with StrToSet - 03-23-2005 , 05:54 AM






Hi.

SELECT {[Customers].[All Customers].[Canada]} ON COLUMNS,
{StrToSet(CStr(LookupCube("Sales", "SetToStr({[Product].Members})")))} ON
ROWS
FROM [Sales]

Does anyone have any idea why the above query fails with an "Unknown
internal error"? When I replace the "[Product].Members" string with
"[Time].Members", it works fine.

The following query, which I think is quite similar, works fine:

SELECT {[Customers].[All Customers].[Canada]} ON COLUMNS,
{StrToSet("[Product].Members")} ON ROWS
FROM [Sales]

Thanks.



Reply With Quote
  #2  
Old   
Brian Altmann
 
Posts: n/a

Default RE: LookupCube: Unexpected Results with StrToSet - 03-23-2005 , 08:25 AM






I believe this happens because the list of product members exceeds the
maximum string length that can be handled by "SetToStr", "LookupCube", or
both.
This is supported by testing your query replacing [Product].Members by
Head([Product].Members, n).
Up to n = 344 this works, then it breaks.
At this point , the string length should be over 32K, which is a likely limit.
HTH,
Brian
www.geocities.com/brianaltmann/olap.html
"John" wrote:

Quote:
Hi.

SELECT {[Customers].[All Customers].[Canada]} ON COLUMNS,
{StrToSet(CStr(LookupCube("Sales", "SetToStr({[Product].Members})")))} ON
ROWS
FROM [Sales]

Does anyone have any idea why the above query fails with an "Unknown
internal error"? When I replace the "[Product].Members" string with
"[Time].Members", it works fine.

The following query, which I think is quite similar, works fine:

SELECT {[Customers].[All Customers].[Canada]} ON COLUMNS,
{StrToSet("[Product].Members")} ON ROWS
FROM [Sales]

Thanks.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.