![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Is there way to count a number of rows in opened cursor before fetching it (%rowcount works only after fetching)? I need to know the number of rows before enter loop. Thanks. No, you have to fetch the data. |
#3
| |||
| |||
|
|
Is there way to count a number of rows in opened cursor before fetching it (%rowcount works only after fetching)? I need to know the number of rows before enter loop. Thanks. |
#4
| |||
| |||
|
|
Am Fri, 10 Dec 2004 09:45:50 +0100 schrieb eudorica snjezana.katusic (AT) htnet (DOT) hr>: Is there way to count a number of rows in opened cursor before fetching it (%rowcount works only after fetching)? I need to know the number of rows before enter loop. Thanks. You may count the rows explicitly before entering the loop. if the cursor statement is: select <projection-clause from .... you may count with: select count(rowid) into <counter_var from .... where <counter_var> is some local variable into which you may store the number of rows the cursor will retrieve. -- Frank Piron, defrankatkonaddot (leftrotate two) Except the number could change from count to the fetch of the data. |
#5
| |||
| |||
|
|
"Frank Piron" <empty (AT) zero (DOT) nil> wrote in message news psisl5wh3m0et4w (AT) news (DOT) online.de...Am Fri, 10 Dec 2004 09:45:50 +0100 schrieb eudorica snjezana.katusic (AT) htnet (DOT) hr>: Is there way to count a number of rows in opened cursor before fetching it (%rowcount works only after fetching)? I need to know the number of rows before enter loop. Thanks. You may count the rows explicitly before entering the loop. if the cursor statement is: select <projection-clause from .... you may count with: select count(rowid) into <counter_var from .... where <counter_var> is some local variable into which you may store the number of rows the cursor will retrieve. -- Frank Piron, defrankatkonaddot (leftrotate two) Except the number could change from count to the fetch of the data. |
#6
| |||
| |||
|
|
Am Fri, 10 Dec 2004 13:11:32 GMT schrieb Jim Kennedy kennedy-downwithspammersfamily (AT) attbi (DOT) net>: "Frank Piron" <empty (AT) zero (DOT) nil> wrote in message news psisl5wh3m0et4w (AT) news (DOT) online.de...Am Fri, 10 Dec 2004 09:45:50 +0100 schrieb eudorica snjezana.katusic (AT) htnet (DOT) hr>: Is there way to count a number of rows in opened cursor before fetching it (%rowcount works only after fetching)? I need to know the number of rows before enter loop. Thanks. You may count the rows explicitly before entering the loop. if the cursor statement is: select <projection-clause from .... you may count with: select count(rowid) into <counter_var from .... where <counter_var> is some local variable into which you may store the number of rows the cursor will retrieve. -- Frank Piron, defrankatkonaddot (leftrotate two) Except the number could change from count to the fetch of the data. Sure. But this is inevitable. |
#7
| |||
| |||
|
|
You may count the rows explicitly before entering the loop. if the cursor statement is: select <projection-clause from .... you may count with: select count(rowid) into <counter_var from .... where <counter_var> is some local variable into which you may store the number of rows the cursor will retrieve. -- Frank Piron, defrankatkonaddot (leftrotate two) Except the number could change from count to the fetch of the data. Sure. But this is inevitable. -- Frank Piron, defrankatkonaddot (leftrotate two) |
#8
| |||
| |||
|
#9
| |||
| |||
|
|
there is no efficient way, you need to run a COUNT(*) query before. What is your problem? Maybe there is another solution other than SELECT COUNT(*) ... I need to send number of steps to outside code. Select count(*) is no |
#10
| |||
| |||
|
|
ak_tiredofspam (AT) yahoo (DOT) com wrote: there is no efficient way, you need to run a COUNT(*) query before. What is your problem? Maybe there is another solution other than SELECT COUNT(*) ... I need to send number of steps to outside code. Select count(*) is no good for performance. Thanks anyway! |
![]() |
| Thread Tools | |
| Display Modes | |
| |