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
 

 

Query Related to Insert..

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

Active User


Joined: 03 Nov 2005
Posts: 269
Location: Mumbai

PostPosted: Thu Dec 02, 2010 5:45 pm    Post subject: Query Related to Insert..
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: 6967
Location: porcelain throne

PostPosted: Thu Dec 02, 2010 6:24 pm    Post subject:
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: 269
Location: Mumbai

PostPosted: Fri Dec 03, 2010 10:06 am    Post subject:
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    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
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Omegamon for DB2 query ashek15 DB2 0 Wed Feb 15, 2017 11:25 am
No new posts Query on DB2 WLM stored procedures ashek15 DB2 8 Sun Feb 12, 2017 11:13 pm
No new posts GETMAIN/FREEMAIN query Suja.Sai CICS 9 Tue Jan 31, 2017 12:01 pm


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