make data set smaller (1 Viewer)

A

andrewbuckland

Guest
I need to change 1000 records which are postcodes, from full postcodes ie;NN17 2NZ to short post codes ie:NN17 2 whilst keeping the full postcodes intact. Please help

[This message has been edited by andrewbuckland (edited 02-13-2002).]
 

David R

I know a few things...
Local time
Today, 12:30
Joined
Oct 23, 2001
Messages
2,633
Look into the string manipulation functions: Left(), Right(), Mid(), and InStr() to add calculated fields to your query. Keep in mind that these fields will, of course, not be directly updateable. (If you update the full field, it will change the calculated field automagically)

HTH,
David R
 
A

andrewbuckland

Guest
Not sure how i would do that
 

David R

I know a few things...
Local time
Today, 12:30
Joined
Oct 23, 2001
Messages
2,633
Did you look up the help files on those functions? They are somewhat helpful in this case, which isn't always true.
If your postal codes always take the form "LL00 0LL" and you always want to strip off the last two chars, add this to a blank field in your query's Design View:
ShortPostalCode: Left([PostalCode],6)

If you need to take off the last two characters and the length can vary, you'll have to use Len([PostalCode])-2 for the length argument.

HTH,
David R

[This message has been edited by David R (edited 02-13-2002).]
 

Users who are viewing this thread

Top Bottom