PL/SQL (MOSC)

MOSC Banner

Query to split table to 50 count group by id and site_id

edited Dec 14, 2015 2:29PM in PL/SQL (MOSC) 16 commentsAnswered ✓

Help with query

I have a table with thousands of records and I have to query it in batches as 50 group by some columns (id,site_id)

For a particular id I can have multiple invoices (1 or 10 or 50 or 100 invoices)

the combination of id and site_id can also give invoices in multiple invoice count (1 or 10 or 50 or 100)

Now I need to send them in batches of 50 and it has to be grouped based on id and site_id and the count should not be greater than 50. the combination count can be equal to or less than 50

If the count is greater than 50 it can be neglected (e.g id 3 in below table)

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center