View previous topic :: View next topic
|
Author |
Message |
Prasanthhere
Active User
Joined: 03 Aug 2005 Posts: 306
|
|
|
|
I have a condition like this
I am using a query to pass values to an array. The array is occuring 10 times. The query may return 100 records . The array varibales are all inside a
copybook so i cannot change the copy book value
Is there any way we can pass the first 10 values to array first then the next 10 values and so on... |
|
Back to top |
|
|
ashimer
Active Member
Joined: 13 Feb 2004 Posts: 551 Location: Bangalore
|
|
|
|
Prasanth,
First of all you must be aware of the fact that after populating the array with first 10 values if you do it again then initial 10 values will be overridden by the new values ... so here assuming you have to do some kinda processing on the fetched values ....
fetch the first 10 values to the array .. maintain a counter ... when the count touches 10 stop fetching and process the array values ..once its done again go for the fetch ...fetch next 10 rows ... make sure your cursor does not get closed ... note that at any point of time only 10 values will be available thru your arrays ...
but if this is the case is there any problem in fetching rows one by one and then processing each record ????
im not sure abt your requirement ... [/code] |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
What is your SQL? |
|
Back to top |
|
|
Prasanthhere
Active User
Joined: 03 Aug 2005 Posts: 306
|
|
|
|
Code done through Scrollable cursor ..
Thanks for the response |
|
Back to top |
|
|
|