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

Updating table 1 column with table 2 column


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
seluri

New User


Joined: 13 Jul 2006
Posts: 2

PostPosted: Thu Jul 13, 2006 5:08 am
Reply with quote

Hi
I am looking for DB2 SQL UPDATE EXAMPLE QUERY FOR UPDATE TABLE "A " column with table "B" column. I want to run this in QMF.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1209
Location: Bangalore,India

PostPosted: Thu Jul 13, 2006 11:11 am
Reply with quote

Hi ,

You can use following query

UPDATE A
SET a = ( SELECT b
FROM B
WHERE .........')
WHERE .............;

By this query you can update coloumn a of Table A by Cloumn b of Table B.
Back to top
View user's profile Send private message
Hanfur

Active User


Joined: 21 Jun 2006
Posts: 104

PostPosted: Thu Jul 13, 2006 11:31 am
Reply with quote

Try this..

UPDATE TEST.TABLE1
SET FIRST_COL_DATE=SEC_COL_DATE


-Han
Back to top
View user's profile Send private message
seluri

New User


Joined: 13 Jul 2006
Posts: 2

PostPosted: Sat Jul 15, 2006 12:49 am
Reply with quote

thanks
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts count contained values of several col... DB2 5
No new posts To join 2 tables and to join 3rd tabl... DB2 8
No new posts Create a specific record/file based o... SYNCSORT 8
No new posts Extract ISPF table column headings CLIST & REXX 2
No new posts Unload and Load ISPF Table TSO/ISPF 4
Search our Forums:


Back to Top