Re: Limited String return for displaying
From: Roji. P. Thomas (thoasroji_no_spam__at_gmail.com)
Date: 10/27/04
- Next message: Jacco Schalkwijk: "Re: Stored procedures security"
- Previous message: Mal .mullerjannie_at_hotmail.com>: "RE: Limited String return for displaying"
- In reply to: CD: "Limited String return for displaying"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 27 Oct 2004 19:10:04 +0530
Try this
DECLARE @vchemail VARCHAR(50)
SET @vchemail = 'jdoe@mail.com'
SELECT LEFT(@vchemail, CHARINDEX('@',@vchemail)-1)
-- Roji. P. Thomas Net Asset Management https://www.netassetmanagement.com "CD" <mcdye1@hotmail.nospam.com> wrote in message news:ujiu4cCvEHA.2116@TK2MSFTNGP14.phx.gbl... >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 > >
- Next message: Jacco Schalkwijk: "Re: Stored procedures security"
- Previous message: Mal .mullerjannie_at_hotmail.com>: "RE: Limited String return for displaying"
- In reply to: CD: "Limited String return for displaying"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|