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
 

 

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: 1537
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 Loading data to table gives wrong for... Raghu navaikulam DB2 18 Thu Jul 13, 2017 2:11 pm
No new posts compare 2 rows within the same file ram_vizag SYNCSORT 7 Wed Jun 14, 2017 12:34 am
No new posts copy SEQ to PDS and create stats steve-myers JCL & VSAM 7 Thu Apr 27, 2017 1:15 am
No new posts unload data from table with lob columns farhad_evan DB2 1 Sat Apr 22, 2017 1:32 pm
No new posts Copy load modules and alias vasanthz IBM Tools 5 Thu Apr 20, 2017 6:31 am


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