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: How to escape hints in PL/SQL

Re: How to escape hints in PL/SQL

From: Andy Hassall <andy_at_andyh.co.uk>
Date: Tue, 29 Aug 2006 23:52:07 +0100
Message-ID: <prg9f2ds9m6ldpr6ju90ijkk7338q5u2sq@4ax.com>


On 29 Aug 2006 15:41:50 -0700, "sidey" <sideyt_at_hotmail.com> wrote:

>Oracle SQL Developer puts a little red underscore right after ujvc
>
>ujvc := '/' || CHR(42) || '+bypass_ujvc */';
>
> sql_stmt := 'UPDATE ('
> || 'SELECT' || ujvc || ' t1.' || c1 || ' c1 '
> ^ _____________________little red thing

> || 'from ' || mytab ' t1, ' || mytab ' t2 '

                         ^ don't you mean here?


> || 'where t1.rowid > t2.rowid '
> || 'and t1.qsn = t2.qsn '
> || 'and t1.qsn2 = t2.qsn2 '
> || ') ' ||
> 'set c1 = -1';
>
> and won't compile the procedure:
>
>Error(135,26): PLS-00103: Encountered the symbol " t1, " when expecting
>one of the following: . ( * @ % & = - + ; < / > at in is mod
>remainder not rem <an exponent (**)> <> or != or ~= >= <= <> and or
>like LIKE2_ LIKE4_ LIKEC_ between || member SUBMULTISET_

 The error message mentions " t1, ", which is on the line below, and is indeed next to a parse error.

 If SQL Developer is putting the mark on the line you mention then it's got an off-by-one bug. Just tried it here, and yes, it puts the error on the wrong line. I don't to use Oracle SQL Developer, but if it bothers you then you should report it as a bug to Oracle.

 (Incidentally, PL/SQL Developer reports the error in the correct place)

-- 
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Received on Tue Aug 29 2006 - 17:52:07 CDT

Original text of this message

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