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 / October 2006

Tip: Looking for answers? Try searching our database.

field lengths ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Pat Backowski - 17 Oct 2006 14:00 GMT
Hi Everyone,

Table A
data= 20text
Table B
Key=4text
Data= doesn't matter

Due to modifications beyond my control, I need to select data from table B,
which has a key field length of 4(text) using the first 4 characters of a
field in table A which has a field length 20(text).  When I use something
like "Select tableB.data where tableB.key = tableA.data, it doesn't
work(tableA.data = "1234")

Any and all help appreciated.
Pat
Brendan Reynolds - 17 Oct 2006 14:12 GMT
SELECT tableB.data FROM tableB INNER JOIN tableA ON Left$(tableB.data, 4) =
tableA.data

You can't create a non-equi-join like this in the graphical query designer's
Design View, but you can create a query using an equi-join (tableB.data =
tableA.data) then switch to SQL View to edit it.

Signature

Brendan Reynolds
Access MVP

> Hi Everyone,
>
[quoted text clipped - 13 lines]
> Any and all help appreciated.
> Pat
Pat Backowski - 17 Oct 2006 14:20 GMT
Thanks, Brendan....that's what I neded.

> SELECT tableB.data FROM tableB INNER JOIN tableA ON Left$(tableB.data, 4) =
> tableA.data
[quoted text clipped - 20 lines]
> > Any and all help appreciated.
> > Pat
 
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.