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.

Make table query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Les - 20 Nov 2007 15:12 GMT
Hello

I have 2 tables that I'm trying to make a new table from with a make table
query.
Ok that's the easy part out of the way.

Basically table 1 has start and end point fields and table 2 has start and
end point fields that are segments of table 1's start and end point fields
(hope that's clear).

Table 1 has a mileage from field, a mileage to field and a category field.
Table 2 has a mileage from field and a mileage to field.

The make table query should say if table 2's start and end points fall
within table 1's start and end points then copy that record along with the
category field to the new table.
John Spencer - 20 Nov 2007 16:37 GMT
A Select query for this would probably look something like the following.

SELECT Table1.Category, Table2.Start, Table2.End
FROM Table2 INNER JOIN Table1
ON Table2.Start <=Table1.End AND
      Table2.End >= Table1.Start

If that gives you the desired results, then you should be able to use that
as the basis for the MakeTable query
SELECT Table1.Category, Table2.Start, Table2.End INTO MyNewTable
FROM Table2 INNER JOIN Table1
ON Table2.Start <=Table1.End AND
      Table2.End >= Table1.Start

Signature

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

> Hello
>
[quoted text clipped - 12 lines]
> within table 1's start and end points then copy that record along with the
> category field to the new table.
 
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.