Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how to fetch multiple records without using cursor

Answer Posted / mahyn

However if we want to fetch and process multiple rows
without using cursor, we can do with the below psuedo code.

assume that seq_num is unique.
h-seq initilized with spaces.

perform until sqlcode = +100 or h-seq >= 500
exec sql
select seq_num into :seq-num from tablename
where seq_num > :h-seq
order by Seq_num with ur;
fetch first 1 row only
end-exec
operations
move seq-num to h-seq
end-perform

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of reorg in db2?

1027


What is sqlca?

1001


What do you mean by storage group (stogroup)?

984


Where do you specify them?

1167


How many types of page locks can be held in db2?

996


Define declaration generator (dclgen).

1068


What is nvl in db2?

1041


What is declare cursor?

1046


Explain dclgen.

1146


What is a plan and package in db2?

1048


Explain correlated sub-queries.

979


Explain about dbrm.

991


Explain how can you do the explain of a dynamic sql statement?

1066


What is the connection string to connect to the DB2 Database ?

1062


How do I delete a column in db2?

1050