Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Posts
    5

    Unhappy Unanswered: Ref cursor problem

    Hi all,

    I have a sql run sucessfully but fail when it embedded in a package procedure which return ref cursor (below). I donno if it is a restriction of oracle PL/SQL:

    procedure sp_GetSomething(..., result_cur in out rc)
    AS
    BEGIN

    OPEN result_cur FOR select v.abc, v.def
    from (
    select abc,
    (select xyz from tableB) def
    from tableA ) v;

    ...
    END sp_GetSomething;

    Errors for PACKAGE BODY PKG_XXXX:

    LINE/COL ERROR
    -------- -------------------------------------------------
    244/30 PLS-00103: Encountered the symbol "DEF" when expecting one of
    the following:
    ; return returning and or...

    thx
    bean

  2. #2
    Join Date
    Mar 2004
    Posts
    6

    Question

    Could it be DEF is a reserved word?

  3. #3
    Join Date
    Feb 2004
    Posts
    5

    Unhappy reply from someone...

    Someone reply from other forum...
    my version is 8i
    -------------------------------------------

    SELECT v.abc, v.def
    FROM (SELECT abc, (SELECT xyz
    FROM tableb) def
    FROM tablea) v;

    (SELECT xyz FROM tableb) in the statement is the INLINE sql.

    In the sql statement you are using a INLINE sql which works fine when you execute sql but Plsql doesn't support this. In 9i it is supported & not in 8i.

    Sunil.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •