• Seems to work for me in both SQL 2000 and SQL 2005. This code creates a 16,000+ character command that returns 16 996-char fields and one 3-char field as results.

    DECLARE @v1 VARCHAR(8000), @v2 VARCHAR(8000)

    SET @v1 = '''' + LEFT(REPLICATE('1234567890', 100), 996) + ''', '

    SET @v2 = REPLICATE(@v1, 8)

    SET @v1 = @v2

    EXEC ('SELECT ' + @v1 + @v2 + '''xyz''')

    Maybe there's a syntax error in your command.