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...

What is the syntax required for the creation of a cursor?

Answer Posted / prasad

Example For cursor Syntax:

Declare Cursor:

EXEC SQL DECLARE CUST_ITM CURSOR
FOR
SELECT
OWN_CUS_NO,

OWN_CUS_ITM_SUF_NO
FROM
NPJXTII
WHERE SCK_NO = :SCK-
NO
AND SCK_DT = :NPS-ORIG-TRANS-
DT

AND SCK_LN_ITM_SEQ_NO = :SCK-LN-ITM-SEQ-
NO

END-
EXEC.

Open Cursor:

EXEC SQL OPEN CUST_ITM
END-EXEC.

Fetch Cursor:

EXEC SQL FETCH CUST_ITM
INTO :OWN-CUS-NO,
:OWN-CUS-ITM-SUF-NO
END-EXEC.


Close Cursor:

EXEC SQL CLOSE CUST_ITM
END-EXEC.

Is This Answer Correct ?    12 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

993


What is explain plan in db2?

940


Is schema the same as database?

1005


How can deadlocks be resolved?

889


What is multi row fetch in db2?

985


Mention the location where the output received from explain statement is stored.

1053


What is the role of data manager in the db2 database?

1050


i want to maintain uniqueness on pdf without make lf??????????

2097


What is a db2 collection?

981


What is the result of open cursor statement?

1027


How do I connect my db2 database to ibm?

984


What is clone table?

994


What is data manager?

993


What is cobol db2?

932


How to view db2 table structure?

959