May I Please ask for your help with this?
From tblGrid I want the record with the top FieldX AND the top FieldY value.
As two separate queries would look like these:
SELECT TOP 1 tblGrid.GridName, tblGrid.FieldX
FROM tblGrid
WHERE tblGrid.FieldX <532917
ORDER BY tblGrid.FieldX DESC;
SELECT TOP 1 tblGrid.GridName, tblGrid.FieldY
FROM tblGrid
WHERE tblGrid.FieldY <185195
ORDER BY tblGrid.FieldY DESC;
How can I have the second query as a subquery of the first?
Thank you for your help
From tblGrid I want the record with the top FieldX AND the top FieldY value.
As two separate queries would look like these:
SELECT TOP 1 tblGrid.GridName, tblGrid.FieldX
FROM tblGrid
WHERE tblGrid.FieldX <532917
ORDER BY tblGrid.FieldX DESC;
SELECT TOP 1 tblGrid.GridName, tblGrid.FieldY
FROM tblGrid
WHERE tblGrid.FieldY <185195
ORDER BY tblGrid.FieldY DESC;
How can I have the second query as a subquery of the first?
Thank you for your help