Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-03-27 : 11:15:16
|
| Joel writes "Hello, i come from a mysql/php background and I want to help somebody who is running sql server 7.0 on nt serverI have saved data of their clients which was in mysql as .sql filesNormally I can insert them into mysql and the .sql files, of course, create the tables and enter the data. Since I exported the clients data in this format and sent it to him, I figured he could insert these .sql files into sql 7 and move on.However, he is not sure if this is possibleCan .sql files be inserted, or just csv styled text files?And which extension for the file is needed?.txt.sql.csvI read the one article I saw in loading data, but it didn't deal with sql filesThanks for your time, I really appreciate it." |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-03-27 : 11:20:22
|
| You can use the SQL files from mySQL, but they need to be modified. MySQL supports this syntax for INSERT:INSERT INTO table1 (col1, col2) VALUES (1,1) (2,2) (3,3)While SQL Server has to do it this way:INSERT INTO table1 (col1, col2) VALUES (1,1)INSERT INTO table1 (col1, col2) VALUES (2,2)INSERT INTO table1 (col1, col2) VALUES (3,3)I can hear you groaning, but you'd be surprised how quickly you can zip through this using search and replace or just copy-and-paste MS Word or a text editor. |
 |
|
|
|
|
|
|
|