469,626 Members | 1,774 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,626 developers. It's quick & easy.

Nested SELECT statements problem

Hi!

I try to figure out how to use a nested "SELECT" statement after the
"IN" predicate. For example, when I try this code, it doesn't return
anything although it should:
SELECT book.IDLivre, aut.Prenom, aut.Nom FROM livre book, livreEcritPar
ecr, auteur aut WHERE ecr.IDLivre = book.IDLivre AND aut.IDAuteur =
ecr.IDAuteur AND book.IDLivre IN ("SELECT book.IDLivre FROM livre book,
livreEcritPar ecr, auteur aut WHERE aut.Prenom like '%$firstName%' AND
aut.Nom like '%$name%' AND ecr.IDAuteur = aut.IDAuteur AND book.IDLivre
= ecr.IDLivre");
So, my question is the following: How should I change syntax in order
to make this bunch of code work? I mean, under Oracle SQL, this syntax
would be legal and work perfectly, so I'm confused how to solve my
problem.

Thanks in advance!
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/my***********...ie.nctu.edu.tw

Jul 19 '05 #1
0 3765

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Jamie Townsend | last post: by
reply views Thread by Pascal Délisle | last post: by
2 posts views Thread by Forgone Conclusion | last post: by
5 posts views Thread by Zero.NULL | last post: by
3 posts views Thread by Tcs | last post: by
10 posts views Thread by nimmi_srivastav | last post: by
2 posts views Thread by pradeep.thekkottil | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.