I have SQL script that gets roles and return string with list of roles
Here is part of code
, ISNULL(SUBSTRING(
(
SELECT ECBR.RoleName + ';' AS [text()]
FROM [External].[vw_ExecutiveChangeByRole] ECBR
WHERE ECBR.VendorExecutiveChangeId = ECH.VendorExecutiveChangeId
AND (ECBR.IsCurrentOrPrior IS NULL OR ECBR.IsCurrentOrPrior = 1)
AND ECBR.RecognizedWith = 'ML'
ORDER BY ECBR.RoleId
FOR XML PATH ('')
), 1, 1000), '') AS RecognizedCurrentRoles
And now showing like VP;Controller;
How I can make this string without last;
, just VP;Controller