Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help Trimming Data 1

Status
Not open for further replies.

Oz1127

Technical User
Oct 12, 2004
19
US
Does anyone know how to trim data in a particular field using a query I'm not proficient with Access yet and I've used the trim function before but never to trim dat in an existing table using an update query. ex. *****\crajo01 (*****\COR1S007_Operations)is the data currently in the field. * = our domain name but basically I want to get rid of everything in this field of the table so I end up with only "crajo01". Any help would be appreciated.
 
If this is a one time operation, just open your table in datasheet view, click in the field/column, select Edit/Replace, and replace your domain name with nothing. You may need to set some options in the find and replace.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Another way:
UPDATE yourTable
SET yourField=Mid(yourField,InStr(yourField,'\')+1)
WHERE yourField LIKE '*\*'

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks for your help gyz.Both of those helped,saved me alot of time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top