|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
General - Help with Truncating a value
Hi All
Im pretty much a beginner with Access. I have created a database with 2 tables. The first table has about 1.8 million lines and each line contains full UK postcodes, eg. AB10 1AA. In the other table i have a list of destinations and postcode sectors, eg. AB10 1 I need to use to link the tables by the full postcode and postcode sector. In excel i would just truncate the value. How can i do this in access?? Any help would be much appreciated. Antony |
|
#2
|
||||
|
||||
|
You may need to investigate into this a little more,..
Take a look at this link,.. <<String Functions >> For example,.. either of the following gives the result as requested above,.. but maybe not for all your records, create a query Mid([Fld],1,6) or Left([Fld],6) etc |
|
#3
|
||||
|
||||
|
Query1
Expr1: Left([yourpostcode],6) then your fields Query2 Expr2: Left([yoursector],6) then your fields Query3 -------- Use Query1 - Expr1 and Query2 - Expr2, many to one (many Expr1's to one Expr2 then your fields
__________________
Did I help you? If so gimme rep by clicking on the scales at the top right corner of this post ![]() Madness does not always howl. Sometimes, it is the quiet voice at the end of the day saying, "Hey, is there room in your head for one more?" |
|
#4
|
|||
|
|||
|
Is it possible to add a column in the table that uses the following criteria,
Left([Postcode],Len([Postcode])-2) I know that i can do this in excel. Is this how it is done in access? |
|
#5
|
||||
|
||||
|
Quote:
You probably should not do that. Excel is a spreadsheet and it is common to store calculated data in its "cells." Access is not a spreadsheet, rather it is a relational database. You should avoid storing calculated values in relational tables, because doing so will cause many future problems for you. The other guys have given you good tips on the way to do it.
__________________
Experience is the thing you have left when everything else is gone. |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft Access Help > General - Help with Truncating a value |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|