Click here to Skip to main content
14,336,321 members
Rate this:
Please Sign up or sign in to vote.
See more:
Id  Qty
A   48.17
B   48.52
C   45.44
D   45.76
E   48.12
F   46.48
G   45.23
H   43.89
I   43.93
J   47.34

In above data there are 10 records,i want to select only those records whose sum=227.33

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

As far as I know, you cannot do this in SQL at all - or if you can it would be hideously complex. It isn't simple in a full programming language which includes arrays, recursion and the ability to build complex structures - which you would probably need to get the result you want.

Don't even try in SQL - do it in your business layer instead.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100