January 19, 2016 at 4:06 pm
Hello,
I am trying to run an MDX query using OPENQUERY as part of some performance testing automation and this is how I am doing:
- Take 500 distinct TPIDs from SQL Dimension
- Pass these to MDX query in WHERE clause
- Prepare a final MDX query, assigning to a variable of VARCHAR(MAX)
- Run the same using OPENQUERY
I am having trouble at #3 because my when I take TPIDs from #1 and add the MDX syntax, the output seems to be quite big so it doesn't fit into my variable and while I am trying to execute the final variable using EXEC(@Var1), then I am getting the below error:
The character string that starts with 'SELECT {[Measures].[Amount Const $]} ON 0,
NON EMPTY ([Customer Details].[Detail Top Parent Organization Name].CHILDR' is too long. Maximum length is 8000
Any suggestions will be greatly appreciated.
Thanks!
January 20, 2016 at 2:43 am
I figured out a way to workaround this problem:
- Change the Linked Server settings to RPC available
- Run the query something like, EXEC(@SQL) AT [LinkedServer]
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply