All Forums Database
Raju33 1 post Joined 09/14
15 Sep 2014
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.
 

 
 
 

Raja_KT 1246 posts Joined 07/09
15 Sep 2014

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

Raja K Thaw
My wiki: http://en.wikipedia.org/wiki/User:Kt_raj1
Street Children suffer not by their fault. We can help them if we want.

You must sign in to leave a comment.