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

Query Related to Insert..


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

Active User


Joined: 03 Nov 2005
Posts: 275
Location: Mumbai

PostPosted: Thu Dec 02, 2010 5:45 pm
Reply with quote

Hi All,

My requirement is to Insert 10 rows in a Table at The same time.

Primary key Of the table is combinations of (Col,Col2) Currently table is having 10 Rows with Col1 = 'A' and Different values for COl2.

My requiremnt is to replicate all above 10 rows only with changed values for Col1. Means a new set of rows with COl1 = 'B' keeping all other data similar.

Currently I am selecting the data in cursor, changing the value of Col1 and again inseritng into table

I will be very thankful if anyone guides me to any other more efficient way for this requirement
Thanks in Advance

Regards,
Chandan
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Dec 02, 2010 6:24 pm
Reply with quote

something along this line may help: A suggestion by GuyC
Back to top
View user's profile Send private message
chandan.inst

Active User


Joined: 03 Nov 2005
Posts: 275
Location: Mumbai

PostPosted: Fri Dec 03, 2010 10:06 am
Reply with quote

Thanks Dick..It's working fine

I would have tried this..I will take care henceforth..
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 RC query -Time column CA Products 3
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Query on edit primary command CLIST & REXX 5
No new posts Query on edit primary command CLIST & REXX 1
No new posts Insert header record with record coun... DFSORT/ICETOOL 14
Search our Forums:

Back to Top