I am writing a query that will select data from 3 different tables - movies, dates, and images. In the dates and movies table there will always be exactly 1 row for each movie, but in the images table there may be multiple rows for a given movie.
The results I want may contain multiple movies - all the movies that start on a specific date, but I need to limit the results to exactly one row for each movie. Right now I am getting multiple rows for the movie if I have multiple images.
For example, I want:
March2, Wild Hogs, image1
March2, Zodiac, image1
What I'm getting is
March2, Wild Hogs, image1
March2, Wild Hogs, image2
March2, Zodiac, image1
March2, Zodiac, image2
I guess I could do this by running two separate queries, but I would prefer to do it in one.
2007-02-28
13:41:21
·
3 answers
·
asked by
Justin H
7