Nesting Queries in code (SQL string)

S

Steve S

this query (qryX) is a stored query.

SELECT Fees.[SSheet]
FROM Fees INNER JOIN Entries ON Fees.FeeID = Entries.FeeID
WHERE (((Fees.ContestID)=49) AND ((Entries.TwirlerID)=1697))
GROUP BY Fees.[SSheet]
HAVING (((Fees.[SSheet])>0));

How do Nest the SQL code above (qryX) within the SQL string below?

strSQL = "SELECT First(""SS "" & [SS Name]) AS SSName " _
& "FROM qryX INNER JOIN SSheets ON qryX.[SSheet] = SSheets.[SS
ID] " _
& "WHERE ((ScoreSheets.Org) = 1) " _
& "GROUP BY ScoreSheets.SortKey;"

As suggested in various posts to this forum I had to break out qryX because
I was getting the error " Join not supported". I do not want to store either
query as a saved query since they are both single use procedures.

thanks for any and all suggestions
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top