469,106 Members | 2,338 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Please help!! Sub Select Problem with MySQL 4.1

Can someone please tell me what is wrong with this statement?

I have upgraded to MySQL 41. and 5.0 and cannot get MySQL to return
the correct results from my database. This same query works correctly
with MS-SQLSERVER.

I have started both 4.1 and 5.0 with the --new function just to be
sure, but I have been told that MySQL does support these statements.

Any help would be greatly appreciated;

select bookings.key1,bookings.surname,bookings.firstname, bookings.bookingseqno,
bookings.filetype from bookings where bookings.bookingseqno in
(select bookingseqno from bookingcharacteristics where
bookingcharacteristics.chartype=1 and
(bookingcharacteristics.charvalue = 2)) and bookings.bookingseqno in
(select bookingseqno from bookingcharacteristics where chartype=2 and
(bookingcharacteristics.charvalue = 3)) order by bookings.key1,
bookings.bookingseqno

It does not return an error, just ALL records, and I know there is
only 1 record that qualifys to be returned.

Are there other switch settings that need to be changed or set in
MySQL?

Thank you much,
Gary Bouchard
ga***@removethis.se.rr.com
Jul 19 '05 #1
0 1027

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Krakatioison | last post: by
4 posts views Thread by NotYetaNurd | last post: by
1 post views Thread by shara | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.