Updating duplicate rows in table

Database
N/A

Updating duplicate rows in table

Using MSSQL 2000. I have a table with duplicate rows that needs to be updated. I have new values with similar table.

Table A:

UID        Type

11796     30

11796     31

11796     48

11556     302

11556     305

11552     146

Table B:

UID        Type

11796     50

11796     45

11796     48

11556     312

11556     315

11552     113

Need to update values of Table A using Table B. I see people on internet using CTE but it's not clear to me as I am new to SQL.

Table B may or may not have same number of rows as Table A, if it has less number of values, I can leave the original value as it is and if it has more values then I can skip extra values.

1 REPLY
Enthusiast

Re: Updating duplicate rows in table

Here it is Teradata forum . MSSQL folks may give you the right direction. I think a merge may help you.