• Lowell (7/10/2013)


    instead of

    EXEC sp_executesql @sql

    use

    EXEC(@sql)

    which has no limits on the query size, since it's not parameterized. ou are not passing parameters via sp+executesql, so you'd be good to go, i think.

    Hi Lowell,

    Thanks for your quick response.

    Because we are using the link server (OLAP) that will not allow string > 8000 Chars so it will pass the incomplete MDX query to server and give error while EXEC(@sql):

    FROM OPENQUERY(OLAP, ''' + @mdx + ''')'

    Actually