Link to home
Create AccountLog in
Avatar of njgroup
njgroup

asked on

is mysql syntax is similar to mssql?

hi,

I have a huge sql document, written for mysql to create tables and insert values for ip sddressing and physical locations (I think millions of records), the problem is that it's basically mentioned for mysql, and I wanna implement it in mssql, as I dont have my sql, and I am not familiar with mysql, so can I implenet it directly in mssql? or there is conversion tool or something like that??
Avatar of san_spy
san_spy
Flag of India image

No the syntax will be different mostly in things like date time insertion etc. I would recommend create a mysql environment and then migrate using sql server migration assistance.
Avatar of njgroup
njgroup

ASKER

ok I have downloaded mysql, and install it, how can I migrate from mysql to mssql?

by the way, it looks like there is no gui for mysql !!
If you need just text values to be inserted then it could be compatible. Or it should be possible to update the SQL script in some editing software.

Post a small part of the sql document as a text file. We may check if it contains incompatible elements.
Avatar of njgroup

ASKER

now I have the file somesql.sql, how do I run it in mysql, then after that, how I can migrate data from mysql to mssql?
Avatar of njgroup

ASKER

I think the best way is to run the file in mysql, because it's extemely slow in notepad editors as it have millions of records, so how to run it first in mysql, then migrate it to mssql?
ASKER CERTIFIED SOLUTION
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
I have checked the file basically this format wont work in SQL Server lots of changes needs to be done. Check the below link.

http://www.codeproject.com/KB/database/migrate-mysql-to-mssql.aspx



Avatar of njgroup

ASKER

I have a very small question, are you capable to open file in notepad or notepad++??

I got it disaster, extremely slow, 15 min to open a file!!
Yes, the Notepad is extremely slow but FoxPro did it in 20 seconds.

One more thing: The file contains two tables, so the first step is to split it into two parts.
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Try wordpad..
You may look at the result. I am just not sure what tool to use on MS SQL for import...
IPdb.7z.zip
Avatar of njgroup

ASKER

oh, I took only one line from .sql and I wanna replace the ),( to ) INSERT INSERT INTO ip_group_city VALUES (

but it took more than 30 min, and still waiting and sql is not responding!!

I got corei7 with 8GB DDR3 RAM and that is happening!!

any solution?
Yes, even the SQL Server Management Studio cannot process such a big file in a reasonable amount of time...

Maybe that's the reason why Microsoft discontinued Visual FoxPro. There was simply nothing to complain, nothing to extend.... :-(

I am working in Vista 32 on a notebook.
Avatar of njgroup

ASKER

ok, FoxPro is not working in windows 7 installer :(
Maybe it is impossible to install FoxPro 2.6  in W7 64 bit because it has 16 bit installer... Visual FoxPro 9 is OK.

BUT instead of trying to use old paid software I would recommend some free editors which are available on web for developers.

Avatar of njgroup

ASKER

do u advice or recommend me an editor different than notepad++?
Avatar of njgroup

ASKER

special thanks to pcelba
You are welcome.

Regarding the editor, I would try Metapad: http://liquidninja.com/metapad/ (but I have no personal experience with it).