Re: Complex Querys using instances of tables
- From: "Francis" <francis_1750@xxxxxxx>
- Date: 6 Jan 2006 05:31:46 -0800
Very Good your explanation. Thanks a lot!
Indeed it took me some time but i learned with this examples.
RESUMING:Among other methods to accomplish this we have these (all
right and working in access 2003)
*YourMethod 1: WHERE SUBQUERY (instancing table to filter it but the
subquery is made in WHERE clause)
*YourMethod 2: INNER JOIN (creates another table of maxresults, and
combines with initial table to retrieve values)
I think my first example that is in Oracle mode, should be the
equivalent a third option that is:
*FirstMethod 3: FROM SUBQUERY (instancing table to filter it but the
subquery is made in FROM clause)
SELECT DISTINCT rh.report_name, rh.user_name, rh.report_run_date
FROM report_history AS rh, (SELECT report_name, max(report_run_date) as
maxdate FROM report_history GROUP BY report_name) AS maxresults
WHERE rh.report_name=maxresults.report_name And
rh.report_run_date=maxresults.maxdate;
Observations: notice that square brackets and period are not needed in
Access 2003 :).
For instancing or subquerying the sintaxe only needs generaly:
(query|subquery|table) AS <name>
Thanks :)
.
- References:
- Complex Querys using instances of tables
- From: Francis
- Re: Complex Querys using instances of tables
- From: John Spencer
- Complex Querys using instances of tables
- Prev by Date: Re: Crosstab Value field formula too long, min() and max() function help sought
- Next by Date: Re: DLOOKUP FOR NEXT
- Previous by thread: Re: Complex Querys using instances of tables
- Next by thread: Re: Complex Querys using instances of tables
- Index(es):
Relevant Pages
|