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

Home -> Community -> Usenet -> c.d.o.tools -> "Connect by" can't be put in Function?

"Connect by" can't be put in Function?

From: Diviner <diviner_at_hknet.com>
Date: Fri, 19 Jan 2001 21:01:21 +0800
Message-ID: <3A683AA1.4541E038@hknet.com>

I created a table and used this for querying very well:

       select filename from docindex
       start with refno = 42
       connect by prior parentnode = refno;

But I failed to create this Function object:

    create or replace function GetFullPath(pDocIndexRefNo DocIndex.RefNo%type)

        return varchar
        as
     begin
        select filename from docindex
        start with refno = 42
        connect by prior parentnode = refno;

        return 'Hello';
     end;

Just a simple function, where are my wrong?

--
Best regards,
Diviner.
Received on Fri Jan 19 2001 - 07:01:21 CST

Original text of this message

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