I’m a student learning both MS Access and SQL at my community college. Though I’m earning a 4.0 I’m afraid my teacher doesn’t know SQL or access well enough to teach queries (he’s using the internet to teach us, he’s a data modeler by proffesion) I’m wondering what is the best resource I can use to teach myself basic query building.
For instance I’ve had two questions that I needed answered.
The first is I have three tables. Staff, Radio/Staff(junction) and Radio.
I want to use a form to sign radios out to staff members but I don’t want the database to allow 1 radio to be signed out to more than 1 person at a time.
Secondly when I use the following query it list every last name in the staff table regardless if there is a radio signed out to them.
SELECT [Radio/staff].[Date-Out], [Radio/staff].[Date-In],
[Radio/staff].[Radio Number], [Radio/staff].[Staff Number], Staff.[Last Name]
FROM Staff LEFT JOIN [Radio/staff] ON Staff.[Badge Number] =
[Radio/staff].[Staff Number]
GROUP BY [Radio/staff].[Date-Out], [Radio/staff].[Date-In],
[Radio/staff].[Radio Number], [Radio/staff].[Staff Number], Staff.[Last Name]
ORDER BY [Radio/staff].[Date-Out] DESC;
How do I tweak it to just show the last names of individuals that have a radio?