Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

SSIS - Unable to issue multiple statements to mySQL using Execute SQL Task

$
0
0
I'm trying to issue multiple commands to a mySQL database using an SSIS 'Execute SQL Task'. A single Execute SQL task with either one of the commands below works fine. TRUNCATE TABLE profiler_current.email_profiler;INSERT INTO profiler_current.email_profiler( email_address) SELECT gc.`E-mail 2 - Value` FROM src_google_current.google_contacts gc UNION SELECT gc.`E-mail 3 - Value` FROM src_google_current.google_contacts gc UNION SELECT gc.`E-mail 4 - Value` FROM src_google_current.google_contacts gc UNION SELECT Email FROM src_sfdc_current.sfdc_contacts sc UNION SELECT Private_Email__c FROM src_sfdc_current.sfdc_contacts sc;However as soon as I combine both commands into a sing task (either as a direct input or a file connection) I get the following error:-'ERROR [42000] [MySQL][ODBC 5.3(w) Driver][mysqld-5.6.17]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO profiler_current.email_profiler( email_address) SELECT'I know there is no syntax error with my SQL as the whole script runs in mySQL and each command runs ok via the Execute SQL Task. Does anyone know what the problem is here, am I missing something? I can't seem to find anyone who has had this problem before (or indeed examples of any successful uses with mySQL). I know I can use an execute process task instead and run the mySql script from a batch file but this compromises security as I have to issue the password in clear text or interactively.I'm using a connection manager type = ADO.NET:System.Data.Odbc.OdbcConnection This connection works fine as a connector for an ADO Net Destination.

Viewing all articles
Browse latest Browse all 3145

Trending Articles