View Full Version : Only one instance per record


Spica
08-05-2004, 03:38 PM
I have this query:

SELECT TapeNr, Title, StartTime, EndTime
FROM Movies
INNER JOIN Actors
ON Movies.ID = Actors.MovieID
WHERE Actors.Actor = "Carol"

The problem is that when there are more than one actor in a movie that has the name "Carol", the same movie exists more than once in the result.

Is there any way that I can do this so a movie only can exist once in the result?

aleb
08-05-2004, 07:30 PM
SELECT distinct TapeNr, Title, StartTime, EndTime
FROM Movies
INNER JOIN Actors
ON Movies.ID = Actors.MovieID
WHERE Actors.Actor = "Carol"


That might help