Home Forums SQL Server 7,2000 T-SQL Limitation of Varchar 8000 in executing a dynamic MDX inside stored Procedure RE: Limitation of Varchar 8000 in executing a dynamic MDX inside stored Procedure

  • I know that this is an old post, but it helped me out today. I never bothered to read up on execute().

    This will work. execute (@Query + @Query1 + @Query2), splitting the MDX script in three parts, each less than 8000 characters and declaring the variables as varchar(max).

    Now I can run MDX script of any length from my stored procedures. It used to be a pain.