freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- 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
-
[freetds] Different Data?,
Vendetti, Jeff, 10/14/2003
- <Possible follow-up(s)>
- RE: [freetds] Different Data?, ZIGLIO Frediano, 10/14/2003
- [freetds] Different Data?, Vendetti, Jeff, 10/14/2003
- RE: [freetds] Different Data?, Зверев Виталий Борисович, 10/14/2003
Archive powered by MHonArc 2.6.24.