Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
DURGESH
Posting Yak Master
105 Posts |
Posted - 2008-06-12 : 01:13:26
|
Hello allGud Morningi have two table tableAid,v1,v2,v3,v4,v5 are the columnstableBid,Values are the columnsid Value1 value11 value2 1 value31 value41 value5now i want to update the values of col Value of tableB to tableAand i want the output of tableA asid v1 v2 v3 v4 v51 value1 value2 value3 value4 value5can anybody help me to solve the issue using update querythanks in advanceYES I HAVE MORE 10 FIELDS BUT I AM INSERTING ALL THOSE FIELS USING INSERT QUERY |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-12 : 01:52:25
|
Is there any other fields available in your tableB? |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-12 : 02:07:01
|
Can you provide some sample data from you table (may be for a single ID) |
 |
|
mayoorsubbu
Yak Posting Veteran
95 Posts |
Posted - 2008-06-12 : 23:43:22
|
Durgesh,Try thisUpdate tableA set value1 = (select Value1 from tableb where tableA.id = tableB.id) , value2 = (select Value2 from tableb where tableA.id = tableB.id) , value3 = (select Value3 from tableb where tableA.id = tableB.id); |
 |
|
|
|
|