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  

need to delete the first 4 numbers of each record



 
 
Thread Tools Display Modes
  #1  
Old May 26th, 2004, 04:57 PM
Jimmy
external usenet poster
 
Posts: n/a
Default need to delete the first 4 numbers of each record

I have 45000 records. In one field about 80% of those records are in a
format: 4numbers space and a word (any word). What I need is to delete
those 4 first numbers in every record that begins with 4 numbers. Is it
possible? Can someone help?
Thank You
Jimmy


  #2  
Old May 26th, 2004, 05:11 PM
Cheryl Fischer
external usenet poster
 
Posts: n/a
Default need to delete the first 4 numbers of each record

You could use the IsNumeric() function to determine whether the first 4
characters in your field evaluate to a number, as in the following untested
example:

IIf(IsNumeric(Left([MyField], 4)), Mid([MyField, 6), [MyField])

Insert the above expression into the Field: row of a Select Query to test
it out. If you like it, then use the expression in the Update to: row of
an Update Query.

--

Cheryl Fischer, MVP Microsoft Access



"Jimmy" wrote in message
...
I have 45000 records. In one field about 80% of those records are in a
format: 4numbers space and a word (any word). What I need is to delete
those 4 first numbers in every record that begins with 4 numbers. Is it
possible? Can someone help?
Thank You
Jimmy




  #3  
Old May 26th, 2004, 05:15 PM
external usenet poster
 
Posts: n/a
Default need to delete the first 4 numbers of each record

If it is a text field and the records that do not have the
numbers have blanks in the the first four positions you
could use the RIGHT function to ignore the first four
positions.

If text and does not meet above. Create a file that has
first four charcters and then set up a flag field to use
in a joined update where you only update the fields with
numbers in first four fields. A little brute force but
sometime brute over brains is in the end quicker.

-----Original Message-----
I have 45000 records. In one field about 80% of those

records are in a
format: 4numbers space and a word (any word). What I need

is to delete
those 4 first numbers in every record that begins with 4

numbers. Is it
possible? Can someone help?
Thank You
Jimmy


.

 




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


All times are GMT +1. The time now is 02:41 PM.


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