Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

Concatinating variables are missing some text

$
0
0
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 OPENQUERYI 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 8000Any suggestions will be greatly appreciated.Thanks!

Viewing all articles
Browse latest Browse all 3145

Trending Articles