I have a table that has 2 columns, SSN and StateID. There are duplicate rows with the same SSN, but not all rows have a StateID. I want to select the rows that have a null StateID, and update it with the row with a matching SSN, and has a StateID.
Example of data
SSN StateID
123456789 XYZ
123456789
123456789
000000001 ABC
000000001
I want to update the null values in StateID with the row value that does not have a null value.