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

Update table values with another table values using SQL


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

New User


Joined: 05 Apr 2005
Posts: 4

PostPosted: Tue Mar 07, 2006 5:13 pm
Reply with quote

Hi,

I need to update table values with another table values using SQL.
Help me please.
Back to top
View user's profile Send private message
ksmvali

New User


Joined: 05 Apr 2005
Posts: 4

PostPosted: Tue Mar 07, 2006 5:15 pm
Reply with quote

Hi,

I need to update 8265 rows with another table values using SQL.
Help me please.
Back to top
View user's profile Send private message
ragshere

New User


Joined: 20 Dec 2004
Posts: 70

PostPosted: Tue Mar 07, 2006 6:44 pm
Reply with quote

Hi,
what type of help you are expecting?


Rags
Back to top
View user's profile Send private message
raghunathns

Active User


Joined: 08 Dec 2005
Posts: 127
Location: rochester

PostPosted: Tue Mar 07, 2006 7:16 pm
Reply with quote

update table1

set col1 = (select colx from tbl2 where tbl1col = tbl2col)

where <your condition for 8256 rows>
Back to top
View user's profile Send private message
ragshere

New User


Joined: 20 Dec 2004
Posts: 70

PostPosted: Wed Mar 08, 2006 12:20 pm
Reply with quote

Hi,

use this
update table1 T1

set col1 = (select colx from tbl2 T2 where T1.col = T2.col)

where <your condition for 8256 rows>


it will go fine.


Thanks
Rags
Back to top
View user's profile Send private message
ksmvali

New User


Joined: 05 Apr 2005
Posts: 4

PostPosted: Thu Mar 09, 2006 7:24 pm
Reply with quote

Thanks Rags
Back to top
View user's profile Send private message
Rameshs

New User


Joined: 15 Jun 2005
Posts: 53
Location: India, Chennai

PostPosted: Mon Mar 13, 2006 4:22 pm
Reply with quote

Update table1 t1 set row=(select * from table2 t2 where t1.col=t2.col)
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 Can BPXBATCH update TAPE file COBOL Programming 3
Search our Forums:


Back to Top