My real question is:
Why it can be explained in Sqlplus with the EXACTLY the SAME sql
statment, and it failed in perl?
I think in Perl, $dbh->do($sql) should work if the $sql is working in
SQLPLUS.
Besides, it is impossible for me to change anything in the sql
statement. It is dynamically get from the shared libary.
And every sql that fails is the ones with rowid, does not seem to be :3
which cause the problem,but i will watch more carefully.
And in my code, I use
while (( $failure != 0 ) && ( $counter < 4 ))
{
if (($dbh->state ne "") && ($dbh->errstr eq ""))
{
$failure = 1;
$counter = $counter + 1;
print "DO_explain failed",$dbh->state,"$stmt_id\n";
$error= $dbh->state;
$sql = "INSERT INTO system.plan_table(statement_id,remarks)
VALUES ('$s
tmt_id', '$error')";
$dbh->do($sql);
}
it did not even check for errors. It just fail out instead of inserting
the errors and continue.
Thanks
-----Original Message-----
From: Tim Bunce [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 04, 2002 11:51 AM
To: Shao, Chunning
Cc: [EMAIL PROTECTED]
Subject: Re: Error in explain plan
On Mon, Mar 04, 2002 at 10:49:21AM -0500, Shao, Chunning wrote:
>
> SQL> explain plan set statement_id = 'SQL' into system.plan_table for
> update roadway_alias a set a.a
> lias =:3 where rowid = :nav_rowid;
> I got the following error message,
> ------------------------------------------------------------
> Can't mix placeholder styles (:foo/:1) at
> /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/DBD/Oracle.pm line
> --------------------------------------------------------------
If it said "Can't mix placeholder styles (:nav_rowid/:3)" would
that make it more clear. Just change the ":3" to ":p3" (or any
name that starts with a letter".
Tim.