Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 6968
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 HEX value search in a DB2 query maxsubrat DB2 2 Wed Oct 04, 2017 3:04 pm
No new posts How to insert a value on specific pos... Poha Eater DFSORT/ICETOOL 9 Sun Oct 01, 2017 3:04 am
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts Create procedure issues -628 when add... chandraBE DB2 1 Mon Sep 18, 2017 12:16 pm
No new posts Question related to Data dictionary f... rexx77 SYNCSORT 3 Thu Aug 31, 2017 7:23 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us