Home » SQL & PL/SQL » SQL & PL/SQL » User_objects
User_objects [message #19713] Thu, 04 April 2002 10:50 Go to next message
Pedro Inácio
Messages: 2
Registered: April 2002
Junior Member
Hi!
Can somebody help me with this, please?

I need to select all rows from a table, but the name of the table is in the user_objects view.

For example i need to do something like this :

Select *
From (select object_name
from user_objects
where object_id = 1234)

I don't know if this is possible, i've tried many ways and none worked.
Re: User_objects [message #19719 is a reply to message #19713] Thu, 04 April 2002 12:34 Go to previous messageGo to next message
Su
Messages: 154
Registered: April 2002
Senior Member
Absolutely. You can create such view and access it. Any way what version of ORACLE are you using? Is it showing any error message?
Re: User_objects [message #19731 is a reply to message #19719] Fri, 05 April 2002 00:38 Go to previous messageGo to next message
Pedro Inácio
Messages: 2
Registered: April 2002
Junior Member
Well, i'm using Oracle 8i.

There is no error message.

I only wanted to know if it was possible to use USER_OBJECTS to obtain a table to use in the FROM clause.

Supose i've a table named xpto.
And i wanted to obtail all record of that table.

What i want is to obtain all records of xpto using the USER_OBJECTS view.

All this in SQL, without using Dynamic SQL....

For now i've use Dynamic SQL and works. But without using Dynamic SQL it is possible to do this?
Re: User_objects [message #19744 is a reply to message #19731] Fri, 05 April 2002 07:37 Go to previous message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
As I mentioned, it is only possible using dynamic SQL.
Previous Topic: null parameters in a PL/SQL procedure
Next Topic: Transposing a table with SQL
Goto Forum:
  


Current Time: Fri Apr 26 14:19:48 CDT 2024