Hi Jamie,
Thanks a lot for the great solution, it does solve my problem. But I have an issue with the size of the dynamic SQL that's in the expression of SQLStatementSource property for a Execute SQL Task. In my case, it's about 587 charactors long. When I try to Evaluate Expression, it cause a truncation error. It is worked out by simplifying the SQL statement to reduce it to 367 charactors. Is there a size limitation for the SSIS expression editor or the SQLStatementSource property?
Thanks,
Charley