From: Jay Krishnamurthy <76326,712@compuserve.com>
Subject: Re: please help me with these queries!
Date: 1995/09/09
Message-ID: <42t6dc$5f5@data.interserv.net>#1/1
references: <MPONIKVAR.11.00531020@crete.hsc.colorado.edu>
to: MPONIKVAR@crete.hsc.colorado.edu
content-type: text/plain; charset=us-ascii
organization: InterServ News Service
mime-version: 1.0
newsgroups: comp.databases.oracle
x-mailer: Mozilla 1.1N (Windows; I; 16bit)


MPONIKVAR@crete.hsc.colorado.edu (Marissa Ponikvar) wrote:

>(1)  I need to list the stars' name(s) and the movie's title of all movies 
>directed by either alfred hitchcock or john ford.
>
>Select starname, mvtitle
>from stars s, movies m, directors d, movstars r
>where s.starnumb=r.starnumb
>and m.mvnumb=rmvnumb
>and d.dirnumb=m.dirnumb
>and dirname = 'Hitchchock, Alfred' or
>dirname = 'Ford, John';
>

Try the "or" with a paranthesis ...

Select starname, mvtitle from stars s, movies m, directors d, movstars r
      where  s.starnumb = r.starnumb   and
             m.mvnumb   = r.mvnumb     and
             d.dirnumb  = m.dirnumb    and
             (dirname = 'Hitchcock, Alfred' or dirname = 'Ford, John') ;

I'll take a look at the rest and will email if I find time ...





