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 -> Query a pl/sql table?

Query a pl/sql table?

From: <ringosoft_at_my-deja.com>
Date: Fri, 12 Jan 2001 23:10:46 GMT
Message-ID: <93o2tg$9tr$1@nnrp1.deja.com>

Is there any way to query a collection? I would like to sort (by way of a select... order by... clause) a pl/SQL table built one record at a time (Oracle 8i), like so:

TYPE T_TEMP_DATA IS table of TEMP_DATA;

--TEMP_DATA is an object type...

V_TEMP_DATA T_TEMP_DATA := T_TEMP_DATA(); BEGIN
  FOR I IN 1 .. 10 LOOP
  V_TEMP_DATA.EXTEND;
  V_TEMP_DATA(I) := TEMP_DATA.INIT_TD(NULL, NULL);
--INIT_TD CREATES A BLANK TEMP_DATA RECORD WITH A TD_GUID = SELECT
Basically, I have created a collection V_TEMP_DATA, and would like to query it as if it were a table, like:

SELECT * FROM V_TEMP_DATA ORDER BY V_TEMP_DATA.SOME_FIELD; Can this be done? If so, how? If not, why not?

Sent via Deja.com
http://www.deja.com/ Received on Fri Jan 12 2001 - 17:10:46 CST

Original text of this message

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