freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Scott Antonivich" <scott AT tpk.net>
- To: <freetds AT lists.ibiblio.org>
- Subject: [freetds] exporting data from ODBC to mysql
- Date: Tue, 20 May 2003 10:32:09 -0400
Hello,
Please bare with me as this is all new territory for me. Here is what I want
to do:
I installed freetds on a RedHat Linux 8.0 box. I am trying to connect and
export a table from a mssql7 database. Below is the script that I am using:
#!/usr/bin/perl
use DBI;
$ENV{'SYBASE'} = '/usr/';
$dbh = DBI->connect('dbi:Sybase:server=XXX', 'XXX', 'XXX')
or die 'connect';
$dbh->do("use XXX");
$sth = $dbh->prepare('select * from XXX') or die 'prepare';
$sth->execute or die 'execute';
while (@data = $sth->fetchrow_array) {
print "$data[0] $data[1] $data[2]\n"; # the first few fields
}
$sth->finish;
$dbh->disconnect;
My question is how do I modify the above script to get the data from a
specific table and imput it into a specific myswl database on my linux box?
Thank you for the help.
Scott
-
[freetds] exporting data from ODBC to mysql,
Scott Antonivich, 05/20/2003
- <Possible follow-up(s)>
- RE: [freetds] exporting data from ODBC to mysql, Lowden, James K, 05/20/2003
- RE: [freetds] exporting data from ODBC to mysql, ZIGLIO Frediano, 05/21/2003
Archive powered by MHonArc 2.6.24.