update firm.firm set email = replace(email,',',' ') where email like '%,%'
update firm.firm set email = replace(email,';',' ') where email like '%;%'
update firm.firm set email = replace(email,' ',' ') where email like '% %'
update firm.firm set email = replace(email,' ',' ') where email like '% %'
insert into firm.contact
(contactname,firmid,email)
select * from (
select 'Kontakt'contactname ,firmid,
LEFT(email, CHARINDEX(' ', email + ' ') - 1) as 'split_values'
from firm.firm where email is not null
) x where split_values not in (select email from firm.contact where status>-1 and isnull(email,'') !='')