简体   繁体   中英

Invalid Memo, OLE, or Hyperlink Object in subquery

Im tryna get an MS Access query to display the top 3 athletes from my dataset, based off of their total points. The total points are in a different table to the athletes and their info, which is making it difficult for me, as i am a noob. Ive got this code which i believe should work;

SELECT [m].ChildsName, [m].MembershipType, [r].TotalPoints
FROM [Members] AS m, [Results] AS r
WHERE ([m].[MembershipType]) In 
   (SELECT TOP 3 [m].MembershipType 
    FROM [Members], [Results]
    WHERE ChildsName = m.ChildsName
    ORDER BY [r].TotalPoints DESC, [m].MembershipType)
ORDER BY [m].ChildsName, [r].TotalPoints DESC , [m].MembershipType;

Only problem is it doesnt work. it brings up the error: Invalid Memo, OLE, or Hyperlink Object in subquery '[m].MembershipType'

All this stuff is being pulled from the 2 tables, members and results

The Memo data type is now called "Long Text".

The problem is that if you have a select within a select you cannot use a memo field so maybe transform your field into short text. Mind that short text is limited to 255 characters afaik.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM