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: 288
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 Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm


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