Skip to Content.
Sympa Menu

freetds - [freetds] Different Data?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Vendetti, Jeff" <Jeff.Vendetti AT FMR.COM>
  • To: "'freetds AT lists.ibiblio.org'" <freetds AT lists.ibiblio.org>
  • Subject: [freetds] Different Data?
  • Date: Tue, 14 Oct 2003 11:47:59 -0400

Sure, here's the perl program:

#!/usr/local/bin/perl
use strict;
use DBI;
my ($dbh, $rc, $sth, @tablesViews);
$dbh = DBI->connect("dbi:Sybase:server=CSL_Central",'fish','fish',
{PrintError => 0});
die "Unable to connect to server $DBI::errstr" unless $dbh;
@tablesViews = qw(
CSLCorePageVolume
CSLPageVolume
CSLPracticeUserVolume
CSLRealmUserVolume
);
foreach (@tablesViews)
{
print "Count for $_: ";
my @dat;
$sth = $dbh->prepare("select count(*) from $_");
if ($sth->execute())
{
while (@dat = $sth->fetchrow())
{
print "@dat\n";
}
}
else
{
print "No Rows\n";
}
$sth->finish();
}
$dbh->disconnect();

And here's the tsql session:

1>
2> select count(*) from CSLCorePageVolume
3> go
2486

The MSQuery returns 5385 rows.

Jeff



Archive powered by MHonArc 2.6.24.

Top of Page