I am using Microsoft SQL Server 2016.
I have two strings containing email addresses called @Recipients
and @Copy_Recipients
.
I need to cut out
those emails from @Copy_Recipients
that exists in @Recipients
.
@Recipients = 'john_snow@com.eu;daenerys_stormborn@com.eu;tonny_hawk@com.eu';
@Copy_Recipients = 'john_snow@com.eu;daenerys_stormborn@com.eu;tommy_leejones@com.eu;johny_cash@com.eu;';
@Wanted_Result = 'tommy_leejones@com.eu;johny_cash@com.eu;';
I know I am not bringing any idea of how to fix this. That's why I am writing. To ask what methods or functions could I use to achieve my goal. Thank you.