var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Compare data and add to table
Newbie here. I was wondering if any of you gurus could answer a question for me. Here is what I need to do (and I stress need):
I have 2 tables.
Table A has 3 columns, column 1 is unique customer numbers, column 2 is ticket numbers, column 3 is empty records.
Table B has 2 columns, column 1 is unique customer numbers (same numbers, although not the same order as Table A) , column 2 is invoice numbers.
I need to compare Table A where records in column 1 match records in column 1 in Table B. Where the records do match, I need to copy the records from Table B, column 2 to Table A column 3.
Can anyone here help me with this, please? It would really get me out of a jam with this, since it is the last step I have to take to finally get this new app rolled out.
Thanks a lot.
Last edited by raspis21; 03-04-04 at
Some app, huh?!
update a set Column3 = b.Column2
from TableA a
inner join TableB b
on a.Column1 = b.Column1
Thank you, thank you, thank you.
As you can see, I am in not a DB admin, nor do I have the resources on had to find the solution to this problem. (or I would have RTFM) Thanks lots, you have relieved me of quite a bit of stress. Thanks again.
I'd buy you a beer if I could.