Advertisement

05.30.2008 at 04:24AM PDT, ID: 23444190
[x]
Attachment Details

update table using select query

Asked by chivas007 in DB2 Database

Tags: database

Hi,
I want to update a colmn in table1 using a column i table 2. query will be like update table1 set column1 = (selet column2 from table2 where column1=column2). Problem is table 2 can contain multiple rows with same column value and i need to update only one row in table1. It returns error multiple result set. Please advise with the correct query.Start Free Trial
 
 
[+][-]05.30.2008 at 04:49AM PDT, ID: 21676823

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.30.2008 at 05:19AM PDT, ID: 21677003

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: DB2 Database
Tags: database
Sign Up Now!
Solution Provided By: momi_sabag
Participating Experts: 2
Solution Grade: A
 
 
[+][-]05.30.2008 at 05:36AM PDT, ID: 21677119

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628