HowardMarks
MIS
Hi all
This is one that always gets me and I can never work out how to achieve it simply. I wonder if someone could post a simple rule to achieve the following result with a SQL query against an Access database.
I wish to return a list of PROMOTERS, but ordered by the number of matching REQUESTS from another table.
For example this is what I have, but it won't work:
Could someone point out where I am going wrong, and I should go about this? It seems like it should be a relatively simple operation.
Many thanks
Nick
Nick (Webmaster)
This is one that always gets me and I can never work out how to achieve it simply. I wonder if someone could post a simple rule to achieve the following result with a SQL query against an Access database.
I wish to return a list of PROMOTERS, but ordered by the number of matching REQUESTS from another table.
For example this is what I have, but it won't work:
Code:
SELECT * FROM PROMOTERS, COUNT(SELECT * FROM REQUESTS WHERE REQUESTS.REQUEST_PROMOTERID = PROMOTERS.PROMOTER_ID) As TotalRequests ORDER BY TotalRequests
Could someone point out where I am going wrong, and I should go about this? It seems like it should be a relatively simple operation.
Many thanks
Nick
Nick (Webmaster)