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 TRANSFER DATA FROM ONE TABLE TO OTHER

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

New User


Joined: 01 Apr 2006
Posts: 17
Location: Pune

PostPosted: Tue Apr 04, 2006 6:43 pm    Post subject: HOW TO TRANSFER DATA FROM ONE TABLE TO OTHER
Reply with quote

I have two tables of the same structure.
Now, i want to sent data from one table to another table which is empty
How can i do this in a single query..!
Back to top
View user's profile Send private message

martin9

Active User


Joined: 01 Mar 2006
Posts: 290
Location: Basel, Switzerland

PostPosted: Tue Apr 04, 2006 7:03 pm    Post subject:
Reply with quote

hy sandy_mcs,

yes you can do this...

combine your insert statement with the select from of the
source table....

INSERT INTO target-table
SELECT *
FROM source-table
WHERE where-clause;

martin9
Back to top
View user's profile Send private message
balusengodan

New User


Joined: 01 Mar 2005
Posts: 15
Location: chennai

PostPosted: Tue Apr 11, 2006 5:04 pm    Post subject:
Reply with quote

hi martin ,

u r absolutely right u can do this we can also use load but i am not clear about this bcz i have n't used this i read in some books we can able to load data of one table to another table with the help of load command
thanks
balu.s
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 copying data without knowing location arunsoods DFSORT/ICETOOL 6 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 18 Thu Jul 13, 2017 2:11 pm
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am
No new posts NDM syntax checking without actually ... GAPX1 All Other Mainframe Topics 0 Wed Jun 07, 2017 2:36 am


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