HI All
I have a process that I am trying to accomplish with one statement. I
cannot think of any way to do it other than using a cursor.
I was wondering if anyone could point me in the right direction.
I want to update the Domain in Table A with the Domain in Table B
where A.Account = B.Account with the highest rank.
----------------------------------
Table A
----------------------------------
----------------------------------
Account | Domain
----------------------------------
----------------------------------
Micorsoft |null
----------------------------------
IBM |null
-------------------------------------------------------------
TAble B
-------------------------------------------------------------
-------------------------------------------------------------
Account | Domain | Rank
-------------------------------------------------------------
-------------------------------------------------------------
Micorsoft |microsoft.com | 9
-------------------------------------------------------------
Micorsoft |yahoo.com | 2
-------------------------------------------------------------
Micorsoft |hotmail.com | 1
Thanks!!!
I have a process that I am trying to accomplish with one statement. I
cannot think of any way to do it other than using a cursor.
I was wondering if anyone could point me in the right direction.
I want to update the Domain in Table A with the Domain in Table B
where A.Account = B.Account with the highest rank.
----------------------------------
Table A
----------------------------------
----------------------------------
Account | Domain
----------------------------------
----------------------------------
Micorsoft |null
----------------------------------
IBM |null
-------------------------------------------------------------
TAble B
-------------------------------------------------------------
-------------------------------------------------------------
Account | Domain | Rank
-------------------------------------------------------------
-------------------------------------------------------------
Micorsoft |microsoft.com | 9
-------------------------------------------------------------
Micorsoft |yahoo.com | 2
-------------------------------------------------------------
Micorsoft |hotmail.com | 1
Thanks!!!
Comment