Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

how to insert more rows at a time thru query

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
santhunaveen

New User


Joined: 22 Sep 2006
Posts: 33

PostPosted: Tue Apr 24, 2007 1:22 pm    Post subject: how to insert more rows at a time thru query
Reply with quote

Hi,

I have a req like....some values i have to insert in 1 DB table....

for example...i want to insert 10 rows at a time with differenet values....

Is it possible with simple query...or i have to write 1 time prog to perform this...

Could any one help me in this regard...
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Apr 24, 2007 8:24 pm    Post subject:
Reply with quote

Hello,

Pretty much by definition "insert" works on an individual row. There is no "insert 10" that i'm aware of.

If you write a bit of code that can be performed to so the insert, you can put your data values into the variables and perform the insert code. 10 sets of move/perform will get your rows inserted wasily. If you put the data in an external file, you would not need 10 sets of moves/performs. Just read the file, move the values, and issue the insert.

If you then save the code, you will be able to easily do this another time without writing a new bit of code. It would be easily clonable to add rows to other tables when needed for testing.

If you place your 10 records in a qsam file (in the proper format) you could also load the records in batch. My preference is to have a program because often the requirement grows and additional code is required.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
No new posts CICS transaction slow response time vasanthz All Other Mainframe Topics 2 Thu Jan 19, 2017 1:31 am
No new posts Join in SQL Query vickey_dw DB2 2 Tue Jan 17, 2017 12:15 am
This topic is locked: you cannot edit posts or make replies. MQ setup query mohitsaini Java & MQSeries 4 Sun Jan 08, 2017 1:53 am
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us