Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2000-11-20 : 17:34:29
|
Bob writes "Hi, I have the following problem. One table with students. One table with courses. One table with subscriptions.
Now I want a resultset that contains a list of all student names with a boolean wether they are subscribed to a certain course. (is it 'subscribed'? excuse my English).
This is a very interesting problem that I finally solved for SQL server: For example if you want the list for CourseID = 2:
SELECT Students.*, Subscriptions.SubscriptionID FROM Students LEFT OUTER JOIN Subscriptions ON Students.StudentID = Subscriptions.StudentID AND Subscriptions.CourseID = 2
Now here's the catch: this doesn't work for Access databases. The last part of the SQL statement is simply not allowed.
Dear Guru I know that you are more of a SQL server person, but I really need this query to work in Access. Do you have some brilliant alternative SQL code for me?" |
|
|
|
|