Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Problem with Cursor-Please help!

Re: Problem with Cursor-Please help!

From: Raj <rajattili_at_hotmail.com>
Date: Mon, 7 Jan 2002 11:44:25 -0500
Message-ID: <a1cj9a$spf@ftp.ee.vill.edu>


Thanks a lot for your response!

"Keith Boulton" <kboulton_at_ntlunspam-world.com> wrote in message news:kob_7.5368$wd1.658733_at_news11-gui.server.ntli.net...
> Unitl version 9, the versions of the sql interpreter in pl/sql and in the
> database engine are not compatible (it's only taken them ten years).
>
> You probably need to rewrite the query avoiding the nested decode.
>
>
> "Raj" <rajattili_at_hotmail.com> wrote in message
> news:a0vchj$3pb_at_ftp.ee.vill.edu...
> > Hi,
> >
> > I am having a weird problem with an SQL I am trying to use as a cursor.
> Here
> > is the SQL:
> >
> > select * from group_at_ruat t1
> > where nvl(trunc(update_date),trunc(sysdate))>
> > decode((select trunc(upd_date)
> > from process_track
> > where upper(ltrim(rtrim(table_name)))='GROUP'
> > and id=t1.quest_group),null,trunc(sysdate))
> >
> > The problem is that this runs fine if I run it from the SQL prompt and
> > returns me data, but if I put it as a cursor, I get the following error
> > messages:
> >
> > PLS-00103: Encountered the symbol "SELECT" when expecting one of
> > the following:
> > ( - + mod not null others <an identifier>
> > <a double-quoted delimited-identifier> <a bind variable> avg
> > count current exists max min prior sql stddev sum variance
> > execute forall time timestamp interval date
> > <a string literal with character set specification>
> > <a number> <a single-quoted SQL string>
> >
> > PLS-00103: Encountered the symbol "," when expecting one of the
> > following: ;
> >
> > The SELECT mentioned in the above error message is the select in the 3rd
> > line of my SQL statement. The second error message refers to the first
","
> > in the last line. I've been trying to fix this for the last couple of
> days,
> > but couldn't do it. Can anyone point me to where am doing this wrong?
> >
> > Thanks for your help.
> >
> > -Raj
> >
> >
>
>
Received on Mon Jan 07 2002 - 10:44:25 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US