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))
This is to Pass the Mail Server : sql,query
---
-Original Message-
From: Arul [mailto:[EMAIL PROTECTED]]
Sent: 26 June 2002 10:33
To: MySQL
Cc: [EMAIL PROTECTED]
Subject: How can this Oracle Query converted to MySQL
SELECT
U.UserID
FROM
Transaction_Data T, Rfq_Data R ,Company C
WHERE
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
What us U.UserID? You don't have table U in the table list.
Arul 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 =
At 03:03 PM 6/26/02 +0530, Arul 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))
You ran this query through
: MySQL
Subject: Re: How can this Oracle Query converted to MySQL
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
create temporary table tmp
SELECT IndustryID FROM
Company_Industries CI WHERE CI.CompanyID = C.CompanyID;
SELECT
U.UserID
FROM
Transaction_Data T, Rfq_Data R ,Company C
WHERE
T.TransactionID = R.TransactionID AND
(R.Industryid=1 or R.IndustryID=tmp.IndustryID)
Cheers
Rich
Arul
PROTECTED]
Cc: MySQL [EMAIL PROTECTED]
Sent: Thursday, June 27, 2002 5:42 AM
Subject: RE: How can this Oracle Query converted to MySQL
In a nutshell, this can be rewritten as a join - no sub-select needed, so
no
problem (this is true of the vast majority - albeit not all -
sub-selects).
Because