I\'d like to select everything AFTER a certain character (-) that is placed on the most right side.
Eg.
abcd-efgh-XXXX
And I\'d like t
DECLARE @x varchar(100) SET @x = 'abcd-efgh-XXXX' SELECT RIGHT(@x, CHARINDEX('-', REVERSE(@x)) - 1)