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 -> table functions from Discoverer or TOAD problem

table functions from Discoverer or TOAD problem

From: Ecce Nihil <sct_at_picknowl.com.au>
Date: 26 Oct 2003 20:28:29 -0800
Message-ID: <96ce817c.0310262028.3f72b54b@posting.google.com>


I have a problem where I create a view over a table function and cannot see the data from TOAD or Discoverer, even though using SQLPlus shows the data OK.

I create some types and a table function like so...

create type query_t as object
(
  user_name varchar2(30),
  sid number
);
/

create type query_table as table of query_t;
/

create or replace
function dwh_discoverer_queries return query_table pipelined as

  out_rec query_t;

begin

  out_rec:=query_t('TEST',1);
  pipe row(out_rec);
  out_rec:=query_t('TEST',2);
  pipe row(out_rec);

  return;

end;
/

And then create a view for this...

create view vw_discoverer_queries as
select * from table(cast(dwh_discoverer_queries as query_table));

Selecting in SQLPlus gives me...
14:55:08 SQL> select * from vw_discoverer_queries;

USER_NAME                             SID
------------------------------ ----------
TEST                                    1
TEST                                    2


But when I look at TOAD or Discoverer I get the right number of rows and the column types are right but the columns are empty! Anyone seen this?

thanks! Received on Sun Oct 26 2003 - 22:28:29 CST

Original text of this message

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