aneilg
asked on
CHARINDEX
i have the following query but its returing the worng results.
current
server\fred.potatoe
, RunBy = SUBSTRING(el.UserName,2,CH ARINDEX('\ ',el.UserN ame,2)-2)
returns
server
i want to retunn fred.potatoe
current
server\fred.potatoe
, RunBy = SUBSTRING(el.UserName,2,CH
returns
server
i want to retunn fred.potatoe
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It's just useful to show how to target the exact position of characters.
ASKER
thanks guys.
substring works fine if you over-read, it'll simply read until the end of string and stop