Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> SQL Question....
Can someone suggest an efficient way to select rows with qty field up to a maximum number of qty?
Here is what I need: I have a table T1 with a columns TYPE and QTY, I need to select all rows with TYPE=<type> but up to some maximum quantity (i.e. dynamically summing QTY).
I'm using a cursor with a counter but my problem is that I need to do it simultaniously on several TYPE's and each to different maximums and every time different set of TYPE's. and it is very slow.
any suggestions?
Thank You
Ron Received on Fri Jan 09 1998 - 00:00:00 CST