Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / August 2005

Tip: Looking for answers? Try searching our database.

delete all text starting with ..

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
teresaalmond@hotmail.com - 31 Aug 2005 19:44 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.