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 -> Re: "a cross join" in cursor

Re: "a cross join" in cursor

From: ja-a <vaganNOSPAM_at_poczta.onet.pl>
Date: Sun, 30 Nov 2003 12:21:45 +0100
Message-ID: <bqcjh8$cq$1@news.onet.pl>


Sorry, my version is Oracle9i
and it should be:
DECLARE CURSOR GET_DEP IS

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

[I was trying to do any join and check if it works]

thx, ja-a

Uzytkownik "Sybrand Bakker" <gooiditweg_at_sybrandb.demon.nl> napisal w wiadomosci news:j62jsvsk3ddpkm7hrdi6rcfngs8ucdvu9b_at_4ax.com...
> On Sun, 30 Nov 2003 01:51:12 +0100, "ja-a" <vagan_at_poczta.onet.pl>
> wrote:
>
> >Does anyone have any idea?
>
>
>
> Posts without version are usually pretty useless as many answers are
> version dependent.
> Also I have never seen anyone joining dictionary tables and normal
> tables in the fashion you post, and your code NOT being 'normal'
> Oracle syntax, you may need to explain why on earth you are doing this
> and what you are trying to accomplish.
>
>
> --
> Sybrand Bakker, Senior Oracle DBA
Received on Sun Nov 30 2003 - 05:21:45 CST

Original text of this message

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