A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Splitting a field



 
 
Thread Tools Display Modes
  #1  
Old February 28th, 2005, 02:29 PM
David#
external usenet poster
 
Posts: n/a
Default Splitting a field

I inherited a table with a [StreetAddress] field wich includes Street Number
and Street Name (ie 155 Annoyance Blvd.) I have put all the numbers into a
Separate [StNo] field, but now need to strip the numbers from the begiinning
og the original field ... the remainig numbers are of course varying in
lengths). Can I somehow delete every thing left of a space, then clean up
after that's done?
  #2  
Old February 28th, 2005, 02:58 PM
Ken Snell [MVP]
external usenet poster
 
Posts: n/a
Default

The Left, InStr, InStrRev, Mid, and Right functions are commonly used for
parsing text strings. For what you seek to do, use Mid and InStr.

UPDATE TableName
SET [StreetAddress]=Trim(Mid([StreetAddress], InStr([StreetAddress], " "));


--

Ken Snell
MS ACCESS MVP

"David#" wrote in message
...
I inherited a table with a [StreetAddress] field wich includes Street
Number
and Street Name (ie 155 Annoyance Blvd.) I have put all the numbers into
a
Separate [StNo] field, but now need to strip the numbers from the
begiinning
og the original field ... the remainig numbers are of course varying in
lengths). Can I somehow delete every thing left of a space, then clean up
after that's done?



  #3  
Old February 28th, 2005, 03:19 PM
David#
external usenet poster
 
Posts: n/a
Default

Thanx - that worked!!



"Ken Snell [MVP]" wrote:

The Left, InStr, InStrRev, Mid, and Right functions are commonly used for
parsing text strings. For what you seek to do, use Mid and InStr.

UPDATE TableName
SET [StreetAddress]=Trim(Mid([StreetAddress], InStr([StreetAddress], " "));


--

Ken Snell
MS ACCESS MVP

"David#" wrote in message
...
I inherited a table with a [StreetAddress] field wich includes Street
Number
and Street Name (ie 155 Annoyance Blvd.) I have put all the numbers into
a
Separate [StNo] field, but now need to strip the numbers from the
begiinning
og the original field ... the remainig numbers are of course varying in
lengths). Can I somehow delete every thing left of a space, then clean up
after that's done?




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
LOOKUP FOR A VALUE ON A TABLE Samora New Users 9 February 22nd, 2005 01:06 PM
Re-format inherited EXCEL data from 1 field to 3 fields in ACCESS Doug Database Design 1 February 21st, 2005 09:50 PM
Text Form Field Ref in Footer Won't Update on Screen StarWine General Discussion 3 December 6th, 2004 06:17 PM
splitting table field with street #'s and names General Discussion 5 October 10th, 2004 07:06 PM
field manipulation Steve Running & Setting Up Queries 2 May 28th, 2004 03:12 PM


All times are GMT +1. The time now is 08:07 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.