Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to split records based on sales order in select statement while using 10000 record limitation.

former_member689332
Discoverer
0 Kudos
186

Dear Experts,

I am using Packaging size 10000 in my select query for sales order table I am getting results like this

line.no Sales.ord Item no.

9997 10009 10

9998 10009 20

9999 10010 10

10000 10010 20

In next iteration:

line.no Sales.ord Item no.

1 10010 30

2 10010 40

But my requirement is Sales order(10010) with multiple items should not split. Can anyone suggest how to achieve this ?

Regards,

KKS.

1 REPLY 1

Sandra_Rossi
Active Contributor
0 Kudos
122

You don't really have the choice. Either you do this:

SMALLER PACKAGE 1
line.no Sales.ord Item no.
...
9997    10009     10
9998    10009     20

PACKAGE 2
line.no Sales.ord Item no.
1       10010     10       ┐
2       10010     20       ├──── sales order 10010
3       10010     30       │
4       10010     40       ┘
5       10020     10
...

or this:

BIGGER PACKAGE 1
line.no Sales.ord Item no.
...
9997    10009     10
9998    10009     20
9999    10010     10       ┐
10000   10010     20       ├──── sales order 10010
10001   10010     30       │
10002   10010     40       ┘

PACKAGE 2
line.no Sales.ord Item no.
1       10020     10
...