I don't want to be guilty of duplicate posting, so if this is the incorrect forum for this question, please redirect me. I'm using Access 2002 and i'm building a form with data from linked SQL Server tables.
I'm trying to refine a query and has two tables with a parent/child type relationship. I want all of the master(parent) records, but only the most recent details(child) records. I've tried a couple of SQL statements that work fine in SQL Query Analyzer, but to do the exact same statements in the SQL View of my Access query builder returns a syntax error with only a portion of a word highlighted, as if it's possibly not really a syntax error, but reacting to something else.
Below is an example. Please Help!
p.s. is there a tgml tag for tab?
Becky,
Ft. Rucker
I'm trying to refine a query and has two tables with a parent/child type relationship. I want all of the master(parent) records, but only the most recent details(child) records. I've tried a couple of SQL statements that work fine in SQL Query Analyzer, but to do the exact same statements in the SQL View of my Access query builder returns a syntax error with only a portion of a word highlighted, as if it's possibly not really a syntax error, but reacting to something else.
Below is an example. Please Help!
Code:
SELECT termination_benefits_master.*, termination_benefits_details.*
FROM termination_benefits_master
INNER JOIN
termination_benefits_details ON termination_benefits_master.tbm_id = termination_benefits_details.tbm_id_fk
AND tbd_id IN (SELECT MAX (termination_benefits_details.tbd_id)
FROM termination_benefits_details
GROUP BY tbm_id_fk)
ORDER BY termination_benefits_master.primary_ssn
p.s. is there a tgml tag for tab?
Becky,
Ft. Rucker