IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Without using cursor can we do mutiple update


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kalaikala

New User


Joined: 21 Jul 2007
Posts: 27
Location: Chennai

PostPosted: Fri Mar 13, 2009 9:58 am
Reply with quote

Hi,

In COBOL-DB2, Without using cursor can we do mutiple update (like mutiple insert)
Back to top
View user's profile Send private message
rajesh_mbt

New User


Joined: 27 Mar 2006
Posts: 97
Location: India

PostPosted: Fri Mar 13, 2009 11:21 am
Reply with quote

Hi Kalai
Ofcourse, you can do multiple update like insert at a time. You need cursor only to select multiple rows from table(s). If you don't mention key field/primary key field in the where condition while updating the table that will update multiple rows icon_exclaim.gif
There is no cursor require for this. Hope, am correct if my understanding is right :-)
Back to top
View user's profile Send private message
kalaikala

New User


Joined: 21 Jul 2007
Posts: 27
Location: Chennai

PostPosted: Fri Mar 13, 2009 2:12 pm
Reply with quote

Thats ok. But i want to update for particular row (with key fields in where clause).

There is an insert statement is there in DB2, we can insert N number of rows. likewise is there anything like that?.
Back to top
View user's profile Send private message
Bharath Bhat

Active User


Joined: 20 Mar 2008
Posts: 283
Location: chennai

PostPosted: Fri Mar 13, 2009 5:38 pm
Reply with quote

You can update N number of rows if the where clause returns N number of rows. If you are asking whether you can specify an array (like multi-insert), then sorry, There's no such method.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Read a flat file and update DB2 table JCL & VSAM 2
No new posts how to update an ISR appl var from an... TSO/ISPF 8
No new posts DB2 SQL query to read and update data... DB2 12
No new posts SKIP LOCKED DATA in UPDATE statement DB2 9
No new posts Group comparison/update between two f... DFSORT/ICETOOL 10
Search our Forums:

Back to Top