steviesackin
Programmer
Hi,
I have been trying to rewrite the following
query without the subquery but my head just exploded.
Any help most gratefully received.
Stevie
SELECT Users.*, Groups.GroupName
FROM (Users
LEFT JOIN GroupUsers ON Users.UserID = GroupUsers.UserID)
LEFT JOIN Groups ON GroupUsers.GroupID = Groups.GroupID
WHERE Users.UserID not in
(SELECT CourseUsers.UserID FROM CourseUsers
WHERE TopicID=1)
ORDER BY Users.Name
I have been trying to rewrite the following
query without the subquery but my head just exploded.
Any help most gratefully received.
Stevie
SELECT Users.*, Groups.GroupName
FROM (Users
LEFT JOIN GroupUsers ON Users.UserID = GroupUsers.UserID)
LEFT JOIN Groups ON GroupUsers.GroupID = Groups.GroupID
WHERE Users.UserID not in
(SELECT CourseUsers.UserID FROM CourseUsers
WHERE TopicID=1)
ORDER BY Users.Name