-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 If I run the first query on mysql 5.0.6 the results are correct, I get 142 rows, if I run it on 5.0.7 I get 8 rows back.
If I remove the nested select, as shown in the second query, then it works fine on 5.0.7. I am trying to understand what is going on. I may try to create a test case to demonstrate this, but I don't understand why the problem is happening in the first place. This is on Solaris 8 and Solaris 9, btw. Thank you for any suggestions. SELECT i.label, i.itemtype, it.name, i.rid, i.status, l.locname, i.lid,(SELECT IF(p.fullname IS NULL, (SELECT CONCAT(sna.fname, ' ', sna.mname, ' ', sna.lname, ' ', sna.gen) FROM nams.names AS sna WHERE sna.badge=sne.badge), p.fullname) AS fullname FROM nams.netids AS sne LEFT OUTER JOIN nams.prefs AS p ON(sne.badge=p.badge) WHERE sne.badge=c.badge) AS UserFullname, i.layoutx, i.layouty, i.theta FROM items AS i INNER JOIN locations AS l ON(i.lid=l.lid) INNER JOIN itemtypes AS it ON(i.itemtype=it.itemtype) LEFT OUTER JOIN curuse AS c ON(c.rid=i.rid) WHERE l.locname='iclab' ORDER BY i.status, i.label; SELECT i.label, i.itemtype, it.name, i.rid, i.status, l.locname, i.lid,(SELECT IF(p.fullname IS NULL, i.layoutx, i.layouty, i.theta FROM items AS i INNER JOIN locations AS l ON(i.lid=l.lid) INNER JOIN itemtypes AS it ON(i.itemtype=it.itemtype) LEFT OUTER JOIN curuse AS c ON(c.rid=i.rid) WHERE l.locname='iclab' ORDER BY i.status, i.label; - -- "Love is mutual self-giving that ends in self-recovery." Fulton Sheen James Black [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFC1R8dikQgpVn8xrARAjsfAJ4hsAKn81s0/rjP3V9N1MccjUVPIACdHbSV XiUuUvFYubdZgQnrfTGBNpw= =mAcq -----END PGP SIGNATURE----- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]