Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Sql problem( select statement)
Abiy Alemu wrote:
>
> Is it possible to have on one row, values from father and son tables(dept
> and emp tables for ex.)
>
> Example
>
> col1 col2 col3 col4 col5
> Accounting king clark miller
> Research Blake Ford Smith Adams
> ... and so on
>
> where Accounting and Research are from the DEPT table and the remaining
> values are from EMP table.
>
> Thank you
> |-----------------------------------------------------------------------------|
> | If the only tool you have is a | Abiy Alemu abiy_at_biotec.jouy.inra.fr |
> | hammer, everything in the world | 9, avenue calmels |
> | seems like a nail.____________________| 92270 Bois colombes (France)________|
You can rig something with multiple instances of the "son" table in the "from" clause if you know a limit on the number of "sons" i.e. select dept_name,e1.emp_name,e2.emp_name,e3.emp_name
from Dept, Emp e1,Emp e2,Emp e3 where ...