#!/usr/bin/perl
use Sybase::DBlib;
$DB_SERVER_NAME="******"; #Server Name
$DB_USER_NAME="******";#User Name
$DB_USER_PSWD="******";#Password
$DB_NAME="******";#Database Name
$DB_TABLE_NAME="******";#Table Name
my $DB_CMD="******";#Query to run
my $dbh = new Sybase::DBlib $DB_USER_NAME, $DB_USER_PSWD, $DB_SERVER_NAME;
$dbh->dbuse($DB_NAME);
$dbh->dbcmd($DB_CMD);
$dbh->dbsqlexec;
while($dbh->dbresults != NO_MORE_RESULTS)
{
while(@data = $dbh->dbnextrow)
{
print "@data\n";
}
}
$dbh->dbclose();
use Sybase::DBlib;
$DB_SERVER_NAME="******"; #Server Name
$DB_USER_NAME="******";#User Name
$DB_USER_PSWD="******";#Password
$DB_NAME="******";#Database Name
$DB_TABLE_NAME="******";#Table Name
my $DB_CMD="******";#Query to run
my $dbh = new Sybase::DBlib $DB_USER_NAME, $DB_USER_PSWD, $DB_SERVER_NAME;
$dbh->dbuse($DB_NAME);
$dbh->dbcmd($DB_CMD);
$dbh->dbsqlexec;
while($dbh->dbresults != NO_MORE_RESULTS)
{
while(@data = $dbh->dbnextrow)
{
print "@data\n";
}
}
$dbh->dbclose();
No comments :
Post a Comment