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
 
how to copy n rows n paste them in same table.

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

New User


Joined: 24 Jul 2007
Posts: 8
Location: Chennai

PostPosted: Wed Aug 08, 2007 12:42 pm    Post subject: how to copy n rows n paste them in same table.
Reply with quote

hi,

i need a sql query which copies n rows in my table and appends them down the table.

can any one help me in this regard.

Srikanth.
Back to top
View user's profile Send private message

Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1544
Location: Andromeda Galaxy

PostPosted: Wed Aug 08, 2007 1:38 pm    Post subject:
Reply with quote

Hi,

Can you please explain your requirement so that not only you but others too will be benefitted through that.
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: Wed Aug 08, 2007 6:22 pm    Post subject:
Reply with quote

Hello,

As has been suggested, you need to clarify what you are asking - your question is completely clear to you, but not others. This
Quote:
appends them down the table
is not terminology that is associated with any database system i've supported.

If you show some existing sample rows and what you want the result to be, that will help.
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Thu Aug 09, 2007 7:44 am    Post subject:
Reply with quote

Might this work?

Code:

SELECT *
INTO SOURCETABLE
FROM SOURCETABLE
WHERE somecolumn = 'somedata'
FETCH FIRST 500 ROWS ONLY;
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 Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am
No new posts Can we combine the rows with same key... V S Amarendra Reddy DB2 12 Fri Dec 01, 2017 10:29 pm
No new posts Compare and COPY using DFSORT pshongal DFSORT/ICETOOL 3 Fri Nov 17, 2017 9:49 am
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm

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