Closed
Description
The following code tagged with the SQL class:
SELECT RIGHT( SUSER_NAME(),LEN( SUSER_NAME())-CHARINDEX('\', SUSER_NAME()))
OUTPUTS:
SELECT RIGHT( SUSER_NAME(),LEN( SUSER_NAME())-CHARINDEX('\'
It appears that the \'
escapes the rest of the string. If I add a space after the slash then it renders correctly (but my SQL code is then incorrect!
SELECT RIGHT( SUSER_NAME(),LEN( SUSER_NAME())-CHARINDEX('\ ', SUSER_NAME()))