I have an attribute that contrains names delimited with ',' like "Sylvain GASNIER,Mickaël BENOIST,ect...,"
I would like to have in result
Sylvain GASNIER
Michaël BENOIST
..
..
The idea is to test if a name exists in the first string, so I split the names then check.
this how I did but I get just the first name.
select
substring(TITULAIRE,1,CHARINDEX(',',TITULAIRE)-1 )
from dbo.DATA_ACTIONS
WHERE TITULAIRE LIKE 'Sylvain GASNIER,Mickaël BENOIST' and CHARINDEX(',',TITULAIRE) > 0;
I would like to do it in a procedure