Hi,
In DTS Packages we have Active X script task and there we say
Set pkg = DTSGlobalVariables.Parent
Set tsk = pkg.tasks("DTSTask_DTSExecuteSQLTask_1")
Set cus = tsk.CustomTask
cus.SQLStatement = <<your statement>>
In SSIS, I dont think you have this facility. All I can say is
Put your query in a global variable of type string and in the Execute SQL Task give the source as Variable and then pick your global variable from the list.
If your string length is less than 4000, then this will work fine.
I am not sure if the length is > 4000 characters.