Nesting Queries in code (SQL string)

  • Thread starter Thread starter Steve S
  • Start date Start date
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
 
Back
Top