T
tstew
Hello,
I need to construct an update query using some fairly bad/dirty data (at
least by my standards). There is one text field that has a lot of data with
an inconsistent number of spaces, commas, characters. It's actually an
address, poorly and inconsistently formatted. The one constant is that there
is a character sequence " CA " preceding the 5 characters I want. It is the
"zip code" data. Sometimes it is missing completely (1-3% of the time),
sometimes it is in zip+4 format (15% of the time), usually it's just the zip
code. I just want the Zip Code portion for filtering in the query.
The Len function won't work, nor will the Right function. So, I'm guessing
it would be some sort of compound criteria. Any ideas?
Different scenario: Same bad data source, different field, formatted as a
text field. If the field contains information like"Postponed to 10/14/2009 @
10:30 AM - Trustees Discretion", I need to parse out just the date. That
field could also contain data like "Cancelled 10/09/2009" or "Active". Any
ideas on this one?
Thanks!!
Mark
I need to construct an update query using some fairly bad/dirty data (at
least by my standards). There is one text field that has a lot of data with
an inconsistent number of spaces, commas, characters. It's actually an
address, poorly and inconsistently formatted. The one constant is that there
is a character sequence " CA " preceding the 5 characters I want. It is the
"zip code" data. Sometimes it is missing completely (1-3% of the time),
sometimes it is in zip+4 format (15% of the time), usually it's just the zip
code. I just want the Zip Code portion for filtering in the query.
The Len function won't work, nor will the Right function. So, I'm guessing
it would be some sort of compound criteria. Any ideas?
Different scenario: Same bad data source, different field, formatted as a
text field. If the field contains information like"Postponed to 10/14/2009 @
10:30 AM - Trustees Discretion", I need to parse out just the date. That
field could also contain data like "Cancelled 10/09/2009" or "Active". Any
ideas on this one?
Thanks!!
Mark