I have 2 address lines in a table. Quite often they will look like
this:
ADDRESS1: JOHN SMITH DBA JS TRUCKING
ADDRESS2: COMPANY
OR
ADDRESS1: TOM JONES DBA
ADDRESS2: JONES TRUCKING COMPANY
I want to use an update qry to delete everything before and including
'DBA'. (Then I can concanenate the 2 fields for one address line) Or,
concanenate, then delete everything before and including dba.. whatever
works.
someone give me some simple function or code to do this in a query,
please?
Tess
tess@conwaycorp.net
pietlinden@hotmail.com - 31 Aug 2005 20:47 GMT
i would start by creating a select query. Use InStr() to find the
location fo "DBA" in your string and then add like 4 to it (I'm doing
this off the top of my head)... then when you just the parts you want,
turn it into an update query and you're ready to roll.
INSTR is in the help. then you'd use LEFT, RIGHT, LEN and MID with it
and you'd be off to the races.