Thanks for replying. I actually found a simpler answer:
SELECT t.field1,t.field2,LEFT(sl.numlist,LEN(sl.numlist)-1) as newfield
FROM(SELECT DISTINCT field2,field1 FROM tableA) t
CROSS APPLY(SELECT distinct CAST(field3 AS varchar(10)) + ',' AS [text()]
FROM tableB
WHERE field2= t.field2
FOR XML PATH(''))sl(numlist)
I created a temp table using this, and then joined it to my original table to update the field.