Copy table form MS-SQL server to MySQL, is it possible? I have a procedure, say "proc1", inside a MS-SQL server.
I would like to create a table (copy of proc1) inside a MySQL server.

So far what I do is this:

1-Create a connection to MS-SQL Server
2- run the code $sql = "exec [procedureName] '$param' ";
3-Traverse all 500.000 lines.
4-Store all lines inside a php variable (had to set ini_set('memory_limit','1024M');).
5-Close the connection.
6-Store the data inside a file.
7-Create a table inside a Mysql server, says MySQL_tbl1.
8-Traverse the file, line by line, Sanitize each field -&gt; escape special character and insert inside MySQL_tl1.
Note: I've tried some variations like insert in one shoot. It improve my code only in 10 seconds.


If I was dealing with a MySQL table to generate another table inside MySQL I could use INSERT INTO ... SELECT. . I think this could be the faster way to create a new table inside the MySQL server.
But I am dealing MS-SQL to MySQL.
So my question is that:
Is it possible to use INSERT INTO ... SELECT in this situation? If yes, how?

Just add a note:
I would like to do this using code => (php+Mysql)
The answer is simple... MySQL WorkBench!  Enables migrations from the following systems.

SQL Server, Access, PostgreSQL, SyBase, etc...
Manage migration projects
Source &amp; Target selection
Object migration
Version upgrades

Here's the link... http://www.mysql.com/products/workbench/migrate/

Price is good too! ;-)

-Tony