I have a script that will preform SQL commands via my unix machine .. the
problem is that I need to run a large (more than 2 line) SQL statement
I have the line:
$sth = $dbh->prepare("UPDATE abacbill..logins set Password='$password' where
UserName='$username' AND DialAccount = 1");
this is the actual statement ... anyone have any ideas how I can make this a
multiple line statement??
here is the script
---------------------------------------------------------------
#!/usr/bin/perl
$ENV{'SYBASE'}="/opt/sybase";
$ENV{'DSQUERY'}="rodopi";
use DBI;
$|=1;
$sql_data_source="dbi:Sybase:";
$sql_username="xxxxxxx";
$sql_auth="xxxxxxxx";
$dbh = DBI->connect($sql_data_source, $sql_username, $sql_auth);
open(OUTPUT,"output");
while(<OUTPUT>) {
($username,$password)=split;
$sth = $dbh->prepare("UPDATE abacbill..logins set Password='$password'
where UserName='$username'
$rv = $sth->execute;
if($rv) {
print "+";
} else {
print ".";
}
$sth->finish;
}
close(OUTPUT);
$dbh->disconnect || warn $dbh->errstr;
===
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.