Limited String return for displaying

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: CD (mcdye1_at_hotmail.nospam.com)
Date: 10/27/04


Date: Wed, 27 Oct 2004 08:16:49 -0500

I am wanting to do a query from a table that has the full stmp mail address
in it. Is it possible to return just the name part and not everything after
the @ sign?

Table.mailaddy:
jdoe@mail.com
msmith@mail.com
mjohnson@mail.com

select mailaddy from table -- not display everything after the @ sign.

RESULTS:

MailAddy
----------------
jdoe
msmith
mjohnson

TIA
C



Relevant Pages

  • Re: Limited String return for displaying
    ... Net Asset Management ... >I am wanting to do a query from a table that has the full stmp mail address> in it. ... > select mailaddy from table -- not display everything after the @ sign. ...
    (microsoft.public.sqlserver.programming)
  • Re: Limited String return for displaying
    ... SELECT LEFT(YourCol, CHARINDEX('@', YourCol) - 1) ... SQL Server MVP ... > I am wanting to do a query from a table that has the full stmp mail ... > select mailaddy from table -- not display everything after the @ sign. ...
    (microsoft.public.sqlserver.programming)