• @carlo: you are right.

    But as per the question, we should give answer for the question: What will you get executing this T-SQL code in Query Analizer (SQL2K) or Management Studio (2005)?

    So, EXEC(@sql) result is 1,2,3,4.

    Thanks