Hi Again,
OK I thought I had this sussed from yesterdays post but I just can get this to work. I have the following SQL
SELECT tblLooms.Loom, [qryAnalysis].Ref, [qryAnalysis].Metres
FROM tblLooms INNER JOIN [qryAnalysis] ON tblLooms.Loom = [qryAnalysis].Loom
WHERE ((([qryAnalysis].Ref) In (select top 5 Ref from [qryAnalysis] where [qryAnalysis].Loom = tblLooms.loom order by [qryAnalysis].Metres desc)))
ORDER BY tblLooms.Loom, [qryAnalysis].SumOfMetres DESC;
I want the top 5 metres for EACH loom and this query just won't work. I've based the query on some help from yesterday but whenever I try to run it it just hangs. I can't see where I'm going wrong. I'd love some help....again.
Many thanks,
GPM
OK I thought I had this sussed from yesterdays post but I just can get this to work. I have the following SQL
SELECT tblLooms.Loom, [qryAnalysis].Ref, [qryAnalysis].Metres
FROM tblLooms INNER JOIN [qryAnalysis] ON tblLooms.Loom = [qryAnalysis].Loom
WHERE ((([qryAnalysis].Ref) In (select top 5 Ref from [qryAnalysis] where [qryAnalysis].Loom = tblLooms.loom order by [qryAnalysis].Metres desc)))
ORDER BY tblLooms.Loom, [qryAnalysis].SumOfMetres DESC;
I want the top 5 metres for EACH loom and this query just won't work. I've based the query on some help from yesterday but whenever I try to run it it just hangs. I can't see where I'm going wrong. I'd love some help....again.
Many thanks,
GPM