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!

Query to find sum and detail lines

user525275Apr 10 2008 — edited Apr 18 2008
<br>
Hi

    I have these tables po_requisition_headers poh and 
po_requisition_lines_all pol

poh table

header_id          req_num
2342                  13222
4562                  13245
7867                  13678

po lines table
line_id header_id     line_num line_amount

12334  2342            1          40,000
12335  2342            2          61,000
12346  4562            1          100,000
12367  7867            1          50,000

how do i get this output
i want all the total line amount for a po more than or equal 100,000 and also want to see the lines records.

like this

13222          2342            1          40,000
13222          2342            2          61,000
13245          2343            1          100,000
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 16 2008
Added on Apr 10 2008
12 comments
1,712 views