I have a varchar
variable been defined like this.
declare @IDs varchar(50)
set @IDs ='111,123,567,'
Now I need to extract the last value in the list always 567.
The values in @IDs
can be like this also
set @IDs ='56,'
In this case we need extract only the value 56.
How can we do it?