Thanks for posting your question in the Microsoft Q&A forum.
I would recommend using a script task instead of an SQL task; The Script task is a multi-purpose tool you can use in a package to fill almost any requirement not met by the tasks included with Integration Services. This article lists Script task code samples demonstrating some of the available functionality.
** Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful **