Home Forums Article Discussions Article Discussions by Author Discuss Content Posted by Stephen Lasham Extracting a String Within Delimeters - Part 2 RE: Extracting a String Within Delimeters - Part 2
Adam Machanic
SSCoach
Points: 15370
More actions
September 13, 2004 at 9:46 am
#522788
Wouldn't it be easier to just use:
SELECT RIGHT(RTRIM(Particulars), LEN(RTRIM(Particulars)) - CHARINDEX(';',Particulars) - 1)
FROM Sample_table
Also, you could remove the RTRIMs if you used VARCHAR instead of CHAR...
--Adam Machanicwhoisactive