[thelist] MySQL to SQL server

Colin Mitchell colin_mitchell at wgbh.org
Fri Jul 13 08:01:26 CDT 2001


Another option - I think that more than a few times I've done something like
this by simpling doing a mysqldump, opening it up in my favorite editor, and
doing a couple of search-and-replaces to chuck the INSERT INTO commands and
any other relevant data.  After a few of those, you should have a pretty
functional CSV file.

Colin


----- Original Message -----
From: "Steve Cook" <steve.cook at evitbe.com>
To: <thelist at lists.evolt.org>
Sent: Friday, July 13, 2001 3:38 AM
Subject: RE: [thelist] MySQL to SQL server


> If you're looking to get the data out in csv format, then the simplest
step
> might be to script it. Using PHP (or whichever favourite scripting
language
> you have), you could quite easily write a script that opens a table at a
> time and simply parses the data into a csv format file.
>
> Then you could use a MySQL generated script to create your DB tables in
SQL
> Server and import the data from your csv files.
>
> Tada!!
>
> Seriously - I hope that helps.
>
> .steve
>
>
> ----------------------------
> Steve Cook
> web strategist
> Evitbe AB tidigare Biljettpoolen
> 031-15 16 17   0703-13 26 31
> steve.cook at evitbe.com     www.evitbe.com
> ----------------------------
>
> >
> > Hello-
> >
> > Does anyone know how you can get data from a MySQL database
> > to SQL server?
> > Apparently you can't export a csv file, you can only export a
> > SQL script.
> > Unfortunately, the sql script it writes out can't simply be
> > run because some
> > of
> > the values being inserted into varchar fields have
> > apostrophe's in them,
> > thus causing a syntax error.
> >
> > Thanks in advance, as usual,
> >
> > Alice
>
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt !





More information about the thelist mailing list