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

Who uses db2?

1047


What action db2 takes when a program aborts in the middle of a transaction?

1156


Which are the db2 tools to protect integrity of the database?

1122


Is the primary key a clustered index?

1149


How do you pull up a query which was previously saved in qmf?

1149


What is bind package and plan in db2?

1053


How do I add a column to a table in db2?

1104


What is a page in db2?

1027


What are host variables in db2?

1072


Differentiate between cs and rr isolation levels? Where do you specify them?

1071


If anyone has IBM Certification Dumps pls forward to me & also let me know what are the Certification Codes that are available in DB2

2045


What is temporal table in db2?

1041


In case if at some point of time db2 is down, would that impact the pre-compilation process of a db2-cobol program?

1044


What is db2 plan table?

1049


What is cursor in dbms?

1068