Trying to identify first occurance

MGAllen

Registered User.
Local time
Today, 04:54
Joined
Jun 30, 2012
Messages
11
I am not an expert with access and appreciate any advice on the following query. I'm tring to select the first occurance of a faculty member identified teaching an online section. So far, I have this information and access does not like. Thank you,

SELECT DISTINCT min[term], [emplid], [last_name], [first_name],
FROM tbl_OIS
WHERE MID(class section, 1, 1)='O';


Again thank you!
 
What field are you basing 'First' on? Do you have a date field? Can you provide some sample data from your table as well as what should be output from the query based on that sample data?
 
I think you may actually need to invoke the Totals functionality for this which would give you something like this ....

Code:
SELECT min[term] AS firstTerm, [emplid], [last_name], [first_name]
FROM tbl_OIS GROUP BY [emplid], [last_name], [first_name]
HAVING MID([class section], 1, 1)='O';

That should give you the first (minimum value of) term for each combination of employee details.
 

Users who are viewing this thread

Back
Top Bottom