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

how to insert more rows at a time thru query


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Tue Apr 24, 2007 8:24 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts To get the count of rows for every 1 ... DB2 3
No new posts To get the the current time DFSORT/ICETOOL 13
No new posts RC query -Time column CA Products 3
No new posts Exclude rows with > than x occurre... DFSORT/ICETOOL 6
No new posts C Compile time time stamps Java & MQSeries 10
Search our Forums:

Back to Top