Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Updating table 1 column with table 2 column

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Updating table 1 column with table 2 column
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: 1191
Location: Bangalore,India

PostPosted: Thu Jul 13, 2006 11:11 am    Post subject:
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    Post subject: Hi
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    Post subject:
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    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 CA SYSVIEW - MQTHRESH updating dynami... Anilkumarmq CA Products 2 Fri Jun 08, 2018 2:06 pm
No new posts Dynamically updating the MQ monitorin... Anilkumarmq Java & MQSeries 0 Fri Jun 08, 2018 2:05 pm
No new posts Extracting DDL for all list of intere... Ashishpanpaliya DB2 5 Mon May 21, 2018 4:08 pm
No new posts Searching a table for the field name? socker_dad COBOL Programming 8 Sat Mar 31, 2018 2:57 am
No new posts Need inputs on DB2 tablespace/table r... ashek15 DB2 3 Sat Mar 24, 2018 11:49 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us