thanks for the good explanation of everything! 🙂
hopefully just one more question, and i will be done.
according to your example ( which is much easier to read ) than my previous post...
could i simply replace the 'first,last' with the column name which has the string values?
i just tried it like this:
declare @String varchar(100);
select @String = 'MyColumn'
select left(@String, charindex(',', @String)-1),
right(@String, len(@String)-charindex(',', @String))
from [MyTable]
then i get a SUBSTRING error message which is weird cause i don't see the SUBSTRING function
in there at all.
Msg 536, Level 16, State 5, Line 5
Invalid length parameter passed to the SUBSTRING function.