Re: ORA-00911 error and COMMIT

From: William Maslin <CATmaslin_at_cvm.msstate.edu>
Date: Tue, 17 Jun 2008 10:51:02 -0500
Message-ID: <CATmaslin-F249DC.10510217062008@nntp.msstate.edu>


In article
<cd3a2c02-e0e7-4086-8fed-891cf38f10db_at_d45g2000hsc.googlegroups.com>,  Ken Denny <ken_at_kendenny.com> wrote:

> On Jun 16, 7:20 pm, William Maslin <CATmas..._at_cvm.msstate.edu> wrote:
> > In article
> > <bf92f83f-57a3-44d6-8897-2db3485d5..._at_m3g2000hsc.googlegroups.com>,
> >  Ken Denny <k..._at_kendenny.com> wrote:
> >
> >
> >
> >
> >
> > > On Jun 16, 12:13 pm, William Maslin <CATmas..._at_cvm.msstate.edu> wrote:
> > > > Hi,
> >
> > > > I'm been playing with using Filemaker Pro to generate and send sql to an
> > > > Oracle 10g database.  The following works fine:
> >
> > > > UPDATE BEVIS DL TEST RESULTS ENTRY
> >
> > > > SET BEVIS DL TEST RESULTS ENTRY.RESULT VALUE = 'A section of liver is
> > > > examined microscopically. '
> >
> > > > WHERE BEVIS DL TEST RESULTS ENTRY.RESULT NAME = 'HISTOPATHOLOGY' AND
> >
> > > > BEVIS DL TEST RESULTS ENTRY.ACCESSION ID = '30257' AND
> >
> > > > BEVIS DL TEST RESULTS ENTRY.TEST CODE = '6005';
> >
> > > > But when I add a COMMIT to the end I get an ORA-00911 error.
> >
> > > > UPDATE BEVIS DL TEST RESULTS ENTRY
> >
> > > > SET BEVIS DL TEST RESULTS ENTRY.RESULT VALUE = 'A section of liver is
> > > > examined microscopically. '
> >
> > > > WHERE BEVIS DL TEST RESULTS ENTRY.RESULT NAME = 'HISTOPATHOLOGY' AND
> >
> > > > BEVIS DL TEST RESULTS ENTRY.ACCESSION ID = '30257' AND
> >
> > > > BEVIS DL TEST RESULTS ENTRY.TEST CODE = '6005';
> >
> > > > COMMIT;
> >
> > > > These statements are generated in Filemaker "calculation" fields in
> > > > which text and field values are concatenated to produce statements like
> > > > those above.  Please understand admit that I'm a complete Oracle and SQL
> > > > novice.  The little that I've learned has come from SQL Visual
> > > > Quickstart Guide and from hacking queries that I've stolen from Crystal
> > > > Reports.
> >
> > > > Thanks!
> >
> > > It could be that it's executing them in a single dynamic SQL command
> > > which should contain one command but it contains two. Try adding a
> > > "BEGIN" at the beginning and an "END;" at the end.
> >
> > I tried your suggestion and now I'm getting an ORA-06550 error: line 1
> > column 6:
> > PLS-00103: Encountered the symbol ";" when expecting the following:
> > begin case, declare, exit, goto... (etc.)
> >
> > There's something about one of those semicolons that Oracle doesn't
> > like.  I think that the semicolon is the problem with the ORA-00911
> > error, too.
> >
> > Thanks for your help!
>
> Don't put a semicolon after "BEGIN"

You're right! That fixed it. Thanks! The book I've been using, Chris Fehily's SQL - VIsual Quickstart Guide, shows a semicolon after the BEGIN. By the way, it's an otherwise excellent book for the complete newbie.

Bill Received on Tue Jun 17 2008 - 10:51:02 CDT

Original text of this message