Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help importing SQL or converting to MySQL

Status
Not open for further replies.

Jurass1c

ISP
Sep 28, 2002
3
GB
I cant seem to import the following sql file into MS SQL server:


Please can someone tell me what I am doing wrong, or give me a step by step guide to doing this correctly If I am missing something out. I would also like to know whether there is an easy way to convert this SQL code into MYSQL code - I would be willing to pay for someone to do it.

TIA.
 
when i open that file in a text editor, i see hexadecimal 00 every second character, e.g.

i.f. .e.x.i.s.t.s. .(.s.e.l.e.c.t. .*. .f.r.o.m

rudy
 
The file is a UNICODE file thus the "extra" characters.

I'm not clear what you mean by import. Normally, you would open the file in SQL Query Analyzer and execute the SQL script it contains. The script creates tables in a SQL database.

To convert to MySQL, you should load it into a text editor or query processor that reads Unicode. You'll have to replace T-SQL statements with MySQL equivalents. If the tables do not exist you can simply delete all of the drop statements before the first Create Table statement. This will eliminate the need to convert them.

You'll likely need to remove the COLLATE SQL_Latin1_General_CP1_CI_AS from each column definition where it appears. I'm not familiar enough with MySQL to know what other syntax changes will be required. You should use the MySQL documentation to determine the correct syntax. If there are remaining issues you can't resolve yourself, I recommend that you post questions about MySQL in the MySQL forum. Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top