Hi All

I tried to port this Oracle Query to MySQL.But Couldnt do it..
I am porting this to MySQL 3.23.51 ..The problem is mainly coz there's
another query within Decode function

The Query is

SELECT DECODE(U.CompanyID, NULL, U.UserID, (SELECT A1.UserID FROM Users A1,
User_Type_Details A2 WHERE A1.UserID = A2.UserID AND
A1.CompanyID = U.CompanyID AND A2.User_TypeID =2)) as UserID
FROM Transaction_Data T, Rfq_Data R, Rfq_Details RD, Users U,
User_Type_Details UTD
WHERE T.TransactionID = R.TransactionID AND
R.RfqID = RD.RfqID AND
RD.TypeID = UTD.User_TypeID AND
RD.Search_Type = 'USER' AND
T.TransactionID = 200 AND
U.UserID = UTD.UserID AND
(R.Industryid=1 or U.IndustryID = R.IndustryID) AND
U.Technology_AreaID = R.Technology_AreaID AND
R.Horizontal_MarketID IN (Select Horizontal_MarketID FROM
User_Horizontal_Market WHERE UserID = U.UserID) AND
U.UserID <> T.UserID AND R.Is_Response = 'N' AND U.User_App_Status NOT IN
('NAP')



Could some one please help me

-Arul




---------------------------------------------------------------------
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

Reply via email to