G
Guest
Hi,
I am having a problem trying to generate a SQL query that will access my
Access 2000 Database..... So you'll undrstand i'll just give you the names of
the tables and the fields of which I am trying to query:
Table Name: tblSecurity
Field I'm trying to access: useremail
Table Name: OngoingRequests
Fields I'm trying to access: Engineer, EstimatedJobHours
Note: Both useremail and Engineer hold email associated addresses
I want to generate a SQL query that selects the useremail of the Engineer
that has the least EstimatedJobHours when all EstimatedJobHours are added up
for each Engineer.....
In Pseudo Code I picture it like this:
SELECT u.useremail
FROM tblSecurity.u, OngoingRequests.e
WHERE u.useremail = e.Engineers
AND SUM(EstimatedJobHours) = MIN(of all SUM)
The reason I need this query is because I want to send a service request
(email) to the engineer in the database with the least amount of Estimated
Job Hours....
I hope this makes sense!! Any suggestions greatly appreciated.... ; )
I am having a problem trying to generate a SQL query that will access my
Access 2000 Database..... So you'll undrstand i'll just give you the names of
the tables and the fields of which I am trying to query:
Table Name: tblSecurity
Field I'm trying to access: useremail
Table Name: OngoingRequests
Fields I'm trying to access: Engineer, EstimatedJobHours
Note: Both useremail and Engineer hold email associated addresses
I want to generate a SQL query that selects the useremail of the Engineer
that has the least EstimatedJobHours when all EstimatedJobHours are added up
for each Engineer.....
In Pseudo Code I picture it like this:
SELECT u.useremail
FROM tblSecurity.u, OngoingRequests.e
WHERE u.useremail = e.Engineers
AND SUM(EstimatedJobHours) = MIN(of all SUM)
The reason I need this query is because I want to send a service request
(email) to the engineer in the database with the least amount of Estimated
Job Hours....
I hope this makes sense!! Any suggestions greatly appreciated.... ; )