File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Cursor in DB2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Cursor in DB2" Watch "Cursor in DB2" New topic

Cursor in DB2

Ramses Butarbutar
Ranch Hand

Joined: Jun 16, 2009
Posts: 52
Anyone know or used to implement cursor in DB2. For update for each row in table, i think
i need cursor to implement this. I've asked uncle Google for this, but he has no answer..
Could you guys show me how to use cursor in DB2 or comment on any knowledge about this.



At the center of non-violence stands the principle of love
.... Martin Luther King, Jr.
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33127

Are you thinking of an updateable resultset maybe?

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Ramses Butarbutar
Ranch Hand

Joined: Jun 16, 2009
Posts: 52
Jeanne Boyarsky wrote:Ramses,
Are you thinking of an updateable resultset maybe?

Hi Jeanne,
Hmm.. i'm not sure.. let me describe what i got here..
There are 3 tables.. part master, part detail, stock. One item subject in part master contain
several item parts.. So when parts came in to warehouse, it should insert part detail based on each subject in part master table.. After that it should automatically update stock table..
e.g. subject A has 10 item ( B - K ).. And i should check each row , write to part detail and based on
each row , update data in stock.. We have more and less 200 subject and each subject contain more and less 30 item parts.. And all transaction daily..
I hope you can get what i mean...
Any suggestion on that jeanne??
I agree. Here's the link:
subject: Cursor in DB2
It's not a secret anymore!