Solved

Newbie ?: Truncate Text Field

Posted on 2004-04-21
5
312 Views
Last Modified: 2008-03-17
Thanks Ahead of time:

I am presuming this is an easy one.
I have an e-mail field that I would like to remove the e-mail extension.  
Example:
"abc123@pleasehelp.com" into just "abc123"

Any help appreciated.
0
Comment
Question by:pmickelson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 1

Expert Comment

by:AngelRider
ID: 10882722
Create yourself a formula along the lines of the following:

Left({email-field}, 1, InStr({email-field}, '@') - 1)

That should do you.
0
 
LVL 42

Accepted Solution

by:
frodoman earned 50 total points
ID: 10882855
That actually won't work.  You'll need either this:

Left({email-field}, InStr({email-field}, '@') - 1)

or this:

Mid({email-field}, 1, InStr({email-field}, '@') - 1)


Both give the same results.
0
 
LVL 1

Expert Comment

by:AngelRider
ID: 10883061
Heh heh, 'scuse my typo..
0
 

Author Comment

by:pmickelson
ID: 10883130
THANK YOU, THANK YOU, THANK YOU!
0
 
LVL 42

Expert Comment

by:frodoman
ID: 10887632
Glad I could help.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question