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 / Queries / November 2007

Tip: Looking for answers? Try searching our database.

Expression Builder and Update Query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
THINKINGWAY - 09 Nov 2007 17:58 GMT
I am trying to create a query that looks at a single table with a field call
region.  The region field begins with the letters SD, format is "SD REGION -
CITY".  I would like to remove the SD and CITY from the field leaving no
spaces but only the REGION.  I tried to use QUERY Builder with Expression
Builder....here's my valiant stab at it.

UPDATE [X-WMS] SET [X-WMS].REGION_NAME = Replace("SD","",1,1,2);
KARL DEWEY - 09 Nov 2007 19:49 GMT
Try this if the field always starts with 'SD ' and only has ' - ' before the
city.

UPDATE [X-WMS] SET [X-WMS].REGION_NAME = Left(Replace([X-WMS].REGION_NAME],
"SD ",""), InStr(Replace([X-WMS].REGION_NAME], "SD ",""), " - ") -3) ;

Signature

KARL DEWEY
Build a little - Test a little

> I am trying to create a query that looks at a single table with a field call
> region.  The region field begins with the letters SD, format is "SD REGION -
[quoted text clipped - 3 lines]
>
> UPDATE [X-WMS] SET [X-WMS].REGION_NAME = Replace("SD","",1,1,2);
 
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.