Hi. First, I removed the CC to the java list, because this problem is not java-related in any way.
Second, I suggest you do some reading in the manual, the questions you asked recently are mostly answered there. On Wed 2002-06-26 at 15:03:19 +0530, [EMAIL PROTECTED] wrote: > SELECT > U.UserID > FROM > Transaction_Data T, Rfq_Data R ,Company C > WHERE > T.TransactionID = R.TransactionID AND > (R.Industryid=1 or R.IndustryID IN (SELECT IndustryID FROM > Company_Industries CI WHERE CI.CompanyID = C.CompanyID)) I started to try to rewrite the query to sub-selects, when I noticed that it is broken. You have no table aliased to U, so U.UserID makes no sense. And it looks as if an restriction on Company is missing (else, the sub-query simply select all IndustrIDs in Company_Industries). Bye, Benjamin. -- [EMAIL PROTECTED] --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php