I need to extract a text string from a text field in SQL 2005. Its highlighted in yellow below.
The string looks like this in the db:
<! 2007-10-10 08:09:29 jrt1130 >
I've written a view to do this:
SELECT SUBSTRING(mrDESCRIPTION, 24, 7) AS UserName, mrID, mrGENERATION, mrDESCRIPTION
FROM dbo.MASTER6_DESCRIPTIONS
The problem is - the id can be variable in length. Therefore the start position will always be 24 but I need to use the space right after the id as the delimiter.
Can I achieve this?
The string looks like this in the db:
<! 2007-10-10 08:09:29 jrt1130 >
I've written a view to do this:
SELECT SUBSTRING(mrDESCRIPTION, 24, 7) AS UserName, mrID, mrGENERATION, mrDESCRIPTION
FROM dbo.MASTER6_DESCRIPTIONS
The problem is - the id can be variable in length. Therefore the start position will always be 24 but I need to use the space right after the id as the delimiter.
Can I achieve this?