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

Home -> Community -> Usenet -> c.d.o.misc -> "a cross join" in cursor

"a cross join" in cursor

From: ja-a <vagan_at_poczta.onet.pl>
Date: Sun, 30 Nov 2003 01:51:12 +0100
Message-ID: <bqbej1$gq1$1@news.onet.pl>


Hi,
I have to write procedure which uses cursor. I need to use A CROSS JOIN to put into cursor all what I need.
The problem is that my question with CROSS JOIN gives my good results when I write it in console.
But in procedure Oracle writes that there are compilation errors and my cursor has wrog structure. I have no idea what is wrog...

Does anyone have any idea?

I create cursor this way:
  DECLARE CURSOR GET_DEP IS

                 SELECT * FROM (SELECT COLUMN_NAME
                                FROM   DBA_TAB_COLUMNS
                                WHERE TABLE_NAME='DEPT')
                                NORMAL JOIN  (SELECT DNAME,LOC
                                             FROM DEPT
                                             GROUP BY DNAME,LOC)
                                ON COLUMN_NAME <> 'DEPTNO';
         REC_CUR GET_DEP%ROWTYPE;

Thanks for your help...I need it very much. (these are my first steps in Oracle - so let me know sth new :-))) ) ja-a Received on Sat Nov 29 2003 - 18:51:12 CST

Original text of this message

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