Split Single Address Field into Component Parts

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Ben Johnson (anonymous_at_discussions.microsoft.com)
Date: 04/06/04


Date: Tue, 6 Apr 2004 04:58:05 -0700

Hi,
I'm working on a database for a client. They want the
database improved and the info displayed in a different
format. Short story: at the moment there is one address
field that contains "17 Some Street". I want to, within a
query, split that single field so that I end up with three
fields - as in "StrNumber", "StrName", "StrType".

I've worked out how to strip out the street number using
the Left function, but I can't work out how to do the rest.

Further problem, in case you're really feeling ambitious,
is that some of these address fields also contain
completely different strings, ie. "C/- Some Real Estate" or
"PO Box 99". It'd be great to be able to differentiate,
but I imagine that's a pretty big ask. I don't want to do
it manually because there are over 10000 records in this
table. And the reason I'm using a query is that I'm trying
to rebuild the database a little more efficiently by taking
a single 70-odd field table and splitting it down into more
relevant, related tables.

All help appreciated.

Cheers,
Ben.



Relevant Pages

  • Re: DBMS and lisp, etc.
    ... Naively implemented with SQL, again for 10 ... (1 query for the initial orders, 1 query for each order for its ... soon as you upgrade to the SQL database. ... (eq (order-customer orderA) ...
    (comp.lang.lisp)
  • Re: OT: SQL
    ... query processing. ... FROM Employees e, Employees m, Management mgt ... Manager and Employee Salaries. ... The scheme used does not model database files in general, ...
    (sci.logic)
  • Re: access 2003
    ... I removed the parameters from the form query source. ... boxes from the form header, events, code, etc and ran the form query source ... forms queries and the SQL because syntax of the SQL will change randomly. ... the Access 97 database, I wouldn't have thought any expressions would be ...
    (microsoft.public.access.conversion)
  • RE: Import external data - web query
    ... Your reply for my query is very extensive, this is for importing a file from ... The data source I want isn't listed in the Select Data Source dialog box. ... information used to connect to a database. ... Check your driver First, make sure you have the right ODBC driver (Open ...
    (microsoft.public.excel.misc)
  • Re: access 2003
    ... I removed the parameters from the form query source. ... synchronize combo boxes to the detail section or the parameter form query ... forms queries and the SQL because syntax of the SQL will change randomly. ... the Access 97 database, I wouldn't have thought any expressions would ...
    (microsoft.public.access.conversion)