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 / Reports / Printing / September 2007

Tip: Looking for answers? Try searching our database.

creating join with only the first 4 characters of a field

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
himmelrich@gmail.com - 28 Sep 2007 18:48 GMT
Anyone can help in creating this join in designer?
John Spencer - 28 Sep 2007 19:11 GMT
the best way to join on just 4 characters is to do it in the SQL view.

If you want to do it in the query design view (the grid).  You can build a
query on the first table with the calculated field

Field: JoinThis: Left(SomeField,4)

Save that query
Now build a query on the second table doing the same thing

Now build a query with the two saved queries as the sources and join on the
two calculated fields.

Alternative
Build the query on the two tables and join on the fields that you need.
Switch to SQL view and find the clause

TableA INNER JOIN TableB ON TableA.Somefield =TableB.AnotherField

Edit that phrase to
TableA INNER JOIN TableB ON Left(TableA.Somefield,4)  =
Left(TableB.AnotherField,4)

Signature

John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
.

> Anyone can help in creating this join in designer?
 
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.