MySQL Forums
Forum List  »  Newbie

MSSQL to MySQL
Posted by: Kadesh Bailey
Date: April 05, 2006 06:33AM

I have this query:
SELECT *,
(Select ItmName From Items Where Items.RecordID = ItemID) as ItemName,
(Select CategoryID From Items Where Items.RecordID = ItemID) as CategoryID,
(Select ClientID From Items Where Items.RecordID = ItemID) as ClientID,
(Select CatName From Categories Where Categories.RecordID in (Select CategoryID From Items Where Items.RecordID = ItemID)) as CategoryName,
(Select FName + ' ' + LName From Clients Where Clients.RecordID in (Select ClientID From Items Where Items.RecordID = ItemID)) as ClientName,
(Select ItmName From ItemTypes Where ItemTypes.REcordID in (Select ItmType From Items Where Items.RecordID = ItemID)) as ItemTypeName,
(Select RecordID From ItemTypes Where ItemTypes.REcordID in (Select ItmType From Items Where Items.RecordID = ItemID)) as ItemTypeID

FROM Offers
ORDER BY DteAdded DESC


Please help me fix it...I don't know what I need to do...I'm searching everywhere and all sites say that MySQL supports subselects/subqueries...but I keep getting an error telling me that I need to check the syntax

Options: ReplyQuote


Subject
Written By
Posted
MSSQL to MySQL
April 05, 2006 06:33AM
April 05, 2006 07:02AM
April 05, 2006 08:27AM
April 05, 2006 11:05AM
April 05, 2006 02:28PM
April 05, 2006 11:26PM
April 06, 2006 12:18PM
April 06, 2006 03:51PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.