| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Join from de-normalized table
Hi
A question on a SQL query problem. I've inherited a DB (don't you just hate that :-)) which has (as part of this problem) 3 tables; called Articles, Images and SpecialImages. Now the relationship in place is Articles --1-to-many --> SpecialImages and Articles--1-to-1-->Images. So some of the fields are like
Article(id, image_id, sp_id1, sp_id2, sp_id3) where image_id is the FK to the Image table, and sp_idX is a foreign key into the SpecialImage table.
I want to get a row which shows the article and all the associated images from both other tables. An outer join seems restricted to only two tables.
I thought that maybe a UNION might help so that i could do the query for each part and then UNION to give the final result set
Any suggestions are most welcome.
regards
grant
![]() |
![]() |