B
bigbore50
Hello
I have something wrong with my query and i can't seem to find it
I want to select put a position number on each of the rows based on
"Completed" date
I have a table like this
5-Digit Dealership Number Completed
12345 12/12/06
12345 11/12/06
12345 5/5/06
23456 4/2/06
etc
Here is my Query
SELECT T1.[5-Digit Dealership Number], T1.COMPLETED, Count(*) AS
[Position]
FROM [tbl_all-info-needed] AS T1 INNER JOIN [tbl_all-info-needed] AS T2
ON (T1.COMPLETED<=T2.COMPLETED)
AND (T1.[5-Digit Dealership Number]=T2.[5-Digit Dealership Number])
GROUP BY T1.[5-Digit Dealership Number], T1.COMPLETED
ORDER BY t1.[5-Digit Dealership Number], T1.completed DESC;
I want it to do this
5-Digit Dealership Number Completed Position
12345 12/12/06 1
12345 11/12/06 2
12345 5/5/06 3
23456 4/2/06 1
etc
The problem is some of the positions are showing up as 4, and 8
and each dealer has a max of 3 completed dates
I want it to group each 5-digit dealer number and put a position on the
completed date
Thanks in advance
I have something wrong with my query and i can't seem to find it
I want to select put a position number on each of the rows based on
"Completed" date
I have a table like this
5-Digit Dealership Number Completed
12345 12/12/06
12345 11/12/06
12345 5/5/06
23456 4/2/06
etc
Here is my Query
SELECT T1.[5-Digit Dealership Number], T1.COMPLETED, Count(*) AS
[Position]
FROM [tbl_all-info-needed] AS T1 INNER JOIN [tbl_all-info-needed] AS T2
ON (T1.COMPLETED<=T2.COMPLETED)
AND (T1.[5-Digit Dealership Number]=T2.[5-Digit Dealership Number])
GROUP BY T1.[5-Digit Dealership Number], T1.COMPLETED
ORDER BY t1.[5-Digit Dealership Number], T1.completed DESC;
I want it to do this
5-Digit Dealership Number Completed Position
12345 12/12/06 1
12345 11/12/06 2
12345 5/5/06 3
23456 4/2/06 1
etc
The problem is some of the positions are showing up as 4, and 8
and each dealer has a max of 3 completed dates
I want it to group each 5-digit dealer number and put a position on the
completed date
Thanks in advance