IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

HOW TO TRANSFER DATA FROM ONE TABLE TO OTHER


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
Search our Forums:

Back to Top