Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Return only a portion of text

0 views
Skip to first unread message

Qaspec

unread,
Aug 23, 2010, 2:36:06 PM8/23/10
to
i have the following column which contains user names

GIDS/Martin
GIDS/Alex

I'd like to take out the GIDS/ portion of the text and only return the name
at the end. Thanks for any help.

Gene Wirchenko

unread,
Aug 23, 2010, 3:30:20 PM8/23/10
to

Look at substring().

Sincerely,

Gene Wirchenko

John Bell

unread,
Aug 23, 2010, 3:30:05 PM8/23/10
to
On Mon, 23 Aug 2010 11:36:06 -0700, Qaspec
<Qas...@discussions.microsoft.com> wrote:


As in:

DECLARE @str varchar(100)

SET @str = 'GIDS/Martin'

SELECT RIGHT(@str,LEN(@str)-CHARINDEX('/',@str))

John

0 new messages