|
Posted by Dot Net Daddy on 03/12/07 14:32
Hello,
I have set up a database for movies. In one table (Movies) I have
movie names, and production years, and also genres. In another table
(Directors), I keep the directors and the movies they directed.
Another table (People) keeps the names of the people. Everybody will
have a unique ID. I have created a query like below to show the name
and production year of the movie, the director name and the genre of
the movie. Genres are also defined in a tabled called Genres.
SELECT Movies.Name, Movies.Year, People.Name AS Director, Genres.Genre
FROM Movies INNER JOIN Directors ON Movies.ID = Directors.MovieID
INNER JOIN Genres ON Movies.Genre = Genres.ID INNER JOIN People ON
Directors.ID = People.ID WHERE (Movies.ID = @MoviesID)
The problem is that it does not return any result. What might be the
problem?
Thanks in advance...
Navigation:
[Reply to this message]
|