[Q]: More than 2 statement in 1 SQL

[Q]: More than 2 statement in 1 SQL

am 10.09.2007 19:42:29 von kiyoshi.suzuki

------_=_NextPart_001_01C7F3D1.F56C45EF
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi=20

Using DBI, can I write more than 2 statement in the same SQL like
following?
This SQL works on my SQL Navigator.
Otherwise, how can I split the SQL into 2 parts?

my($sql1)=3Dqq[
DECLARE
drec QDB.EGS.T_DATAVIEW_REC;
l_date DATE;
BEGIN
.....
END;
\
SELECT
.....
FROM
....
;
];

my($sth) =3D $dbh->prepare($sql1);; $sth->execute();

Then, Error message happened.

DBD::Oracle::st execute failed: ORA-06550: line 18, column 1:
PLS-00103: Encountered the symbol "SELECT" (DBD ERROR: OCIStmtExecute)
at ./event_impact.pl line 362.
DBD::Oracle::st execute failed: ORA-06550: line 18, column 1:
PLS-00103: Encountered the symbol "SELECT" (DBD ERROR: OCIStmtExecute)
at ./event_impact.pl line 362.
-- End of GLOBALDB (disconnect) ! --
make: *** [impact] Error 2
Exit 2

Regards,
K. Suzuki



This e-mail (including any attachments) is confidential, may contain
proprietary or privileged information and is intended for the named
recipient(s) only. Unintended recipients are prohibited from taking action
on the basis of information in this e-mail and must delete all copies.
Nomura will not accept responsibility or liability for the accuracy or
completeness of, or the presence of any virus or disabling code in, this
e-mail. If verification is sought please request a hard copy. Any reference
to the terms of executed transactions should be treated as preliminary only
and subject to formal written confirmation by Nomura. Nomura reserves the
right to monitor e-mail communications through its networks (in accordance
with applicable laws). No confidentiality or privilege is waived or lost by
Nomura by any mistransmission of this e-mail. Any reference to "Nomura" is
a reference to any entity in the Nomura Holdings, Inc. group. Please read
our Electronic Communications Legal Notice which forms part of this e-mail:
http://www.Nomura.com/email_disclaimer.htm


------_=_NextPart_001_01C7F3D1.F56C45EF--