Advertisement

04.17.2008 at 09:59AM PDT, ID: 23331676
[x]
Attachment Details

Difficult query in Access

Asked by estackpo in SQL Query Syntax, Access Coding/Macros

Tags: Microsoft, Office, 2003, Access Query

I have two tables

TableA with Fields TrackNum,RevNum,AName
TableB with Fields TrackNum,Date,BName,Description

They are linked by TrackNum field in the sense that many records in TableA can have the same TrackNum but then have sequential RevNum's. The link into TableB is such that all the records with TrackNum = 1 will be linked to the same record in TableB regarless of the RevNum in TableA.
Also for a given Tracknum in TableB there can be a number of records with different dates and the same value in BName.


I need to be able to create a select query to do the following ( I can do this in code, but was wanting to see if there was a more elegant solution using SQL)...

Select from TableA the TrackNum,RevNum,AName with the Largest RevNum for a given Tracknum as well as the value from TableB that has the Date,BName, and Description for the TrackNum selected in A and the most recent Date in TableB
Start Free Trial
[+][-]04.17.2008 at 12:36PM PDT, ID: 21380569

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.17.2008 at 01:02PM PDT, ID: 21380770

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.25.2008 at 09:31AM PDT, ID: 21441082

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.25.2008 at 09:38AM PDT, ID: 21441144

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: SQL Query Syntax, Access Coding/Macros
Tags: Microsoft, Office, 2003, Access Query
Sign Up Now!
Solution Provided By: ee_rlee
Participating Experts: 2
Solution Grade: A
 
 
[+][-]05.18.2008 at 03:21PM PDT, ID: 21594289

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]05.19.2008 at 06:32AM PDT, ID: 21597581

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.19.2008 at 10:10AM PDT, ID: 21599621

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]06.24.2008 at 06:06PM PDT, ID: 21861893

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]06.28.2008 at 05:20AM PDT, ID: 21890600

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628