Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL Report

Re: SQL Report

From: Praveen <nospam_at_spam.com>
Date: Tue, 06 May 2003 14:18:02 GMT
Message-ID: <3EB7C4B1.2070407@spam.com>


Hi..Guido,

   Thanks a lot for your response. I looked at the doc set. As far as I have searched I haven't seen any place where the details come below the the master record. i.e

<department_noXXX>
<employee_numberYYY>
<employee_numberZZZ>

What I wanted was the detail record to occur below the master record instead of on the side.

Guido Konsolke wrote:
> "Praveen" <nospam_at_spam.com> schrieb im Newsbeitrag
> news:3EB7466A.2020407_at_spam.com...
>

>>Hi..All,
>>
>>    I have 2 tables employee (employeeid), dept (dept_id, ,employeeid).
>>I want to get a report in the following format
>>
>><dept_id1>
>>employeeid1
>>employeeid2
>>...
>>...
>>
>><dept_id2>
>>employeeidXX
>>employeeidYY
>>....
>>...
>>..
>>
>>
>>Is this possible to do it in a single SQL.
>>
>>Regards,
>>
>>P
>>

>
>
> Hi Praveen,
>
> why don't you have a look at your doc set? For example: read about BREAK,
> COLUMN
> and so on. With this formatting options you can easily get what you want.
> And for your
> SQL statement:
> SELECT dept_id, employee.employeeid, employee.name, ...
> FROM dept, employee
> WHERE dept.employeeid = employee.employeeid
> -- ORDER BY whatever
> GROUP BY dept_id;
>
> hth and happy reading,
> Guido
>
>
Received on Tue May 06 2003 - 09:18:02 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US