I am trying to update a table using data from another table. Table ones columns are code1,name1. Table twos columns are code2,name2. Some of the code1's are null and I want to take the code2's and insert them where table1.name1=table2.name2. The problem is is that table has in some places 2 different codes for the same name, and of course I get single row subquery returns more than one row. Is there some way around this? I'm guessing that because there are 2 different code2's for the same name, the insert query can't make up its mind as to which to insert. I am running SQL Server 2000 on XP.
Thanks.