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!

SQL | Match quantity and pick rows

rthampiFeb 4 2021

Hello guys
I'm wondering whether I can figure out something without using PL/SQL. I've a lumpsum figure 1000 and N number of rows those are arranged based on the date ascending.
For example, item AAA sold quantity until date is 1000 and I have a table that has all the PO receipts for the item which has 2000 rows.
image.pngMy requirement is to eliminate all the initial N number rows those sum up to 1000 against received quantity column & the elimination criteria is strictly based on the received date (FIFO). Is it doable

This post has been answered by Frank Kulash on Feb 4 2021
Jump to Answer

Comments

Post Details

Added on Feb 4 2021
14 comments
1,199 views