|
Posted by Dave P on 03/12/07 16:42
it looks like you have many different types of peopls in ur peoples table
directors and
select * from Movies M (nolock)
join peoples d (nolock) d.directorsGroup=m.DirectorsGroup
join peoples. a (nolock) a.ActorsGroup=m.ActorsGroup
join GenRes G (nolock) g.Genres=m.Genres
above is a sample join of somthing of what your data may look like
h
"Dave P" <analizer1@yahoo.com> wrote in message
news:5keJh.6857$M65.1830@newssvr21.news.prodigy.net...
>
> Where you are joining on Directors that 1st Join There
> looks like directors should be the people table...
>
>
> Dave P
>
>
> "Dot Net Daddy" <cagriandac@gmail.com> wrote in message
> news:1173709932.900195.198150@j27g2000cwj.googlegroups.com...
>> 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]
|