Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Join two tables to one recordset with nested table?

199845Oct 8 2008 — edited Oct 8 2008
Hello all!

I want to "de-normalize" two tables into one for presentation reasons. For example:

CREATE TABLE foo(id number)

CREATE TABLE bar(foo_id number, value varchar2(4))

And with some data:

FOO:
------
1
2

BAR:
-----
1, 'gaz'
1, 'boz'
2, 'blah'

Now I want to create a view that holds the value of the BAR table in a nested table, if possible and efficient enough..

VIEW:
------
1, nested_table('gaz,'boz')
2, nested_table('blah')

Any clue for creating such a view? I would prefer a view, because this view will be joined with other tables later.

Thanks in advice!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 5 2008
Added on Oct 8 2008
4 comments
281 views