Home » SQL & PL/SQL » SQL & PL/SQL » read from a structure
read from a structure [message #229964] Tue, 10 April 2007 07:38 Go to next message
avihil
Messages: 3
Registered: April 2007
Junior Member
i need a field from a struture in a table:

select textStruct from x_table;

will return the textStruct,

how can i get one field from this structure.

the SELECT on textStruct returns something like

textStructure(FIELD_1, FIELD_2,FIELD_3, FIELD_4)
------------------------------------------------
STRUCT('asdfas', 'bla bla', 'bla bla 2', ....)

Thanks
Re: read from a structure [message #229966 is a reply to message #229964] Tue, 10 April 2007 07:49 Go to previous messageGo to next message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Something like:

select b.* from table_x a, table(a.textStruct) b;

Regards
Michel
Re: read from a structure [message #229992 is a reply to message #229966] Tue, 10 April 2007 08:42 Go to previous messageGo to next message
avihil
Messages: 3
Registered: April 2007
Junior Member
Thanks, but i didnt understand.

mine is:

SQL> select in_data from eventQ;

IN_DATA(OBJECT, ETYPE, ETIME, ESEVER, ECAUSE
--------------------------------------------------------------------------------
MSGEVENTQ('ORB 1', 3, '10-APR-07 02.18.26 PM AFRICA/JERUSALEM'
, 4, 4, 12, '10-APR-07 02.18.26 PM AFRICA/JERUSALEM', 'Avihil')


so i need one field of MSGEVENTQ,
i didn't understand how to do it with your query.

Thanks.
Re: read from a structure [message #230006 is a reply to message #229992] Tue, 10 April 2007 09:08 Go to previous messageGo to next message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Post a test case (create type, table and insert statements) and I will show you how to do it.

Regards
Michel
Re: read from a structure [message #230182 is a reply to message #230006] Wed, 11 April 2007 02:51 Go to previous message
avihil
Messages: 3
Registered: April 2007
Junior Member
never mind.

Thanks a lot.
Previous Topic: can i find nth row for particular table
Next Topic: Login.sql a very basic question
Goto Forum:
  


Current Time: Fri Dec 09 21:30:14 CST 2016

Total time taken to generate the page: 0.06924 seconds