I am just beginning in Access so i'm learning as I go.
I have a table "Truck Table" that I am trying to Query to rank the inventory using year model and mileage. I have found the following code on another posting that seemed to fit my application and worked for them:
SELECT
T2.Model,
1 +
(
SELECT
COUNT(*)
FROM
(
SELECT DISTINCT
Model
FROM [Truck Table]
) AS T1
WHERE
T1.Model > T2.Model) AS Rank
FROM
[Truck Table] AS T2
ORDER BY
T2.Model DESC
When trying to run the query, it is giving me this error:
I'm not sure where to go from here. Thank you in advance for your help.
I have a table "Truck Table" that I am trying to Query to rank the inventory using year model and mileage. I have found the following code on another posting that seemed to fit my application and worked for them:
SELECT
T2.Model,
1 +
(
SELECT
COUNT(*)
FROM
(
SELECT DISTINCT
Model
FROM [Truck Table]
) AS T1
WHERE
T1.Model > T2.Model) AS Rank
FROM
[Truck Table] AS T2
ORDER BY
T2.Model DESC
When trying to run the query, it is giving me this error:
I'm not sure where to go from here. Thank you in advance for your help.