Convert MySQL to MS SQL Server Part 2 February 21
Following on from my last post on converting MySQL tables to MS SQL, here is the code to convert Insert SQL statements from MySQL to MS SQL. Try it out here: The code for this is really simple. Again, if you have any improvements just post the code here and I’ll update the original and give you credit.
Dim ConvertedSQL As String = ""
ConvertedSQL = Me.txtMySQL.Text
ConvertedSQL = ConvertedSQL.Replace("rn", "")
ConvertedSQL = ConvertedSQL.Replace("'", "''")
ConvertedSQL = ConvertedSQL.Replace("\" & Chr(34), Chr(34))
ConvertedSQL = ConvertedSQL.Replace("INTO " & Me.txtOldTableName.Text, "INTO " & Me.txtNewTableName.Text)
Me.txtMSSQL.Text = ConvertedSQL
');
If you liked this, then subscribe to my RSS feed