|
|
| Author |
Message |
chandracdac Warnings : 1 New User
Joined: 15 Jun 2007 Posts: 37 Location: bangalore
|
|
|
|
Hai
I have a ssmall question. I have 2 tables which are identical. but in my second table some fields are empty .so i have to compare the two tables and
i have to copy the fields from 1st table to second one where ever the fields are empty .can u try? and pls tell me. |
|
| Back to top |
|
 |
References
|
Posted: Mon Aug 27, 2007 11:39 am Post subject: Re: How to compare 2 tables and copy fields |
 |
|
|
 |
saiprasadh
Active User
Joined: 20 Sep 2006 Posts: 86 Location: India
|
|
|
|
Hi Chandra,
Try this query
| Code: |
UPDATE Table1 A
SET A.Column1 = (SELECT B.Column1 FROM
Table B WHERE
A.PrimarykeyColumn =B. PrimarykeyColumn)
WHERE
A.Column1 = ' ' |
Let me know if this works
Thanks
Sai |
|
| Back to top |
|
 |
|
|