I have table1 where I have already some nvarchar results.
nvarchar name
name1
name3
name4
I have table2 where I have records in format
nvarchar name | nvarchar subname
name1 | subname1
name1 | subname2
name1 | subname3
name1 | subname4
name2 | subname1
name2 | subname2
name3 | subname3
I need to go through all the records in table2 and group them by name, then insert all name records into table1 but with the condition they dont exist in table1 already.
Could you please help with this? I would rather delete table1 and recreate it from table2 but table1 has some records which are not in table2 and they have to stay there.
Thank you.