Hmmm... in perl it shouldn't matter until it hits the ';'. But how about
this?
$query = "UPDATE abacbill..logins set Password='$password' where
UserName='$username' AND DialAccount = 1";
$sth = $dbh->prepare("$query");
I would think that would work. Unless I'm mis-understanding the question
about it being multiple line...
--------------------------------------------------------------------------
Aaron Holtz
ComNet Inc.
UNIX Systems Specialist
Email: [EMAIL PROTECTED]
"It's not broken, it just lacks duct tape."
--------------------------------------------------------------------------
On Aug 10, Jamie Orzechowski molded the electrons to say....
>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.
>
===
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.