Home » SQL & PL/SQL » SQL & PL/SQL » Accessing PL/SQL Tables from SQL*Plus
Accessing PL/SQL Tables from SQL*Plus [message #985] Mon, 18 March 2002 15:56 Go to next message
Hersel Ahdout
Messages: 8
Registered: March 2002
Junior Member
How would you access a PL/SQL Table from SQL*Plus?
What type of Variable you define (Is it RefCursor?)
If so, how do you pass the reference of PL/SQL table to the cursor?

I would really appreciate if you can shed some light on this.
Hersel Ahdout
Re: Accessing PL/SQL Tables from SQL*Plus [message #990 is a reply to message #985] Tue, 19 March 2002 00:25 Go to previous messageGo to next message
pratap kumar tripathy
Messages: 660
Registered: January 2002
Senior Member
pl/sql table is pl/sql data type , there is no equivalent data type in sql plus.

better create a pl/sql program .

what is ur requirement ? explain little bit more
Re: Accessing PL/SQL Tables from SQL*Plus [message #995 is a reply to message #990] Tue, 19 March 2002 08:42 Go to previous messageGo to next message
Hersel Ahdout
Messages: 8
Registered: March 2002
Junior Member
Thanks for clarifying this.

I am using a pl/sql table to filter through records obtained through a Hierarchical Query. Unfortunately the INTERSECT checks for match on all elements and LEVEL is a Psudo Column.

So, the only option will be to take an examine the resultset and post them into a pl/sql table.

I was checking tabdemo.sql (Sample Table Demo), and it is using EXTEND, TABLE & CAST for dumping the pl/sql table results into a CURSOR. But, the EXTEND & CAST are gettig rejected.

Any Idea? Thanks for any help.
Hersel
Re: Accessing PL/SQL Tables from SQL*Plus [message #1001 is a reply to message #995] Wed, 20 March 2002 00:03 Go to previous messageGo to next message
pratap kumar tripathy
Messages: 660
Registered: January 2002
Senior Member
what is ur original problem ? i.e. "to filter through records obtained through a Hierarchical Query. "

please explain little bit more about ur original problem,it will be easier to find a workaround
Re: Accessing PL/SQL Tables from SQL*Plus [message #1006 is a reply to message #1001] Wed, 20 March 2002 10:48 Go to previous message
Hersel Ahdout
Messages: 8
Registered: March 2002
Junior Member
Thanks for all the help.
I resolved the problem by the use of a nested Query (As one of the select Table/Views) and resolved the problem.

My understabding was that PL/SQL tables were intended for the filtering and returning the results to an external client (using JDBC).

Now I realize how powerful "Select Query" in oracle is in comparison with SQL Server.

Hersel
Previous Topic: help with a loop
Next Topic: loop error
Goto Forum:
  


Current Time: Wed Apr 24 17:25:11 CDT 2024