Build a query that meets a calcuated field and another criteria

N

Nick

The query in question is linked with two tables. Table One has the route No.
(Primary Key) while the child or table Two having the Action ID (Primary
Key) and the date the route No. was updated. I want to see routes which have
not been updated from current date -30.
The only line that should be displayed are lines 2 and 4
Line Table1. RouteId Table2. Action ID Table2. Dateupdate
1 1802 99 05-23-05
2 301 98 04-20-05
3 1802 97 04-15-05
4 1804 95 03-24-05
5 301 96 04-10-05


How would I write the query not using SQL?
 
J

John Vinson

The query in question is linked with two tables. Table One has the route No.
(Primary Key) while the child or table Two having the Action ID (Primary
Key) and the date the route No. was updated. I want to see routes which have
not been updated from current date -30.
The only line that should be displayed are lines 2 and 4
Line Table1. RouteId Table2. Action ID Table2. Dateupdate
1 1802 99 05-23-05
2 301 98 04-20-05
3 1802 97 04-15-05
4 1804 95 03-24-05
5 301 96 04-10-05


How would I write the query not using SQL?


If you don't have a foreign key field in Table2, indicating which
records in Table2 are joined to a particular record in Table1 (a Line
or RouteID or something else you're not showing), then you cannot.

How are the two tables related? Are you assuming that the first record
in table1 has some mystical connection to the first record in table2,
the second to the second, etc.? If so... you're mistaken!

John W. Vinson[MVP]
 
N

Nick

They are linked by a foreign key. RouteId. it the primary in table 1 and is
the foreign key in table 2 with Action Id as the primary.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top