Changing 5098 to the Last Number in a Rank Plus One?
Would someone please take a look at my database and help me find a way to change the â5089â to just be the last number in my ranking.
So in 3MonthRank all the â5089âsâ should be 692
And in 6MonthRank all the â5089âsâ should be 750
Iâm hoping there is a easy way to do this.
The attached will show you exactly what Iâm asking
I really appreciate you taking the time to help.
Below is the code if that helps.
IIf([Field1]="Red","Stop",IIf([Field1]="Green","Go","Caution"))
SELECT Wholesale_Group_1_export_tbl.[OMNI#],
[sql](Select count(*) from Wholesale_Group_1_export_tbl as B where Wholesale_Group_1_export_tbl.[3MonthTotalRecord$] < B.[3MonthTotalRecord$]+1) AS 3MonthRank,
Wholesale_Group_1_export_tbl.[3MonthTotalRecord$],
Wholesale_Group_1_export_tbl.[3MonthTotalRecords#],
(Select count(*) from Wholesale_Group_1_export_tbl as B where Wholesale_Group_1_export_tbl.[6MonthTotalRecords$] < B.[6MonthTotalRecords$]+1) AS 6MonthRank,
Wholesale_Group_1_export_tbl.[6MonthTotalRecords$],
Wholesale_Group_1_export_tbl.[6MonthTotalRecords#],
(Select count(*) from Wholesale_Group_1_export_tbl as B where Wholesale_Group_1_export_tbl.[9MonthTotalRecords$] < B.[9MonthTotalRecords$]+1) AS 9MonthRank, Wholesale_Group_1_export_tbl.[9MonthTotalRecords$], Wholesale_Group_1_export_tbl.[9MonthTotalRecords#], (Select count(*) from Wholesale_Group_1_export_tbl as B where Wholesale_Group_1_export_tbl.[12MonthTotalRecord$] < B.[12MonthTotalRecord$]+1) AS 12MonthRank, Wholesale_Group_1_export_tbl.[12MonthTotalRecord$], Wholesale_Group_1_export_tbl.[12MonthTotalRecords#] INTO RankTable_tbl
FROM Wholesale_Group_1_export_tbl
ORDER BY Wholesale_Group_1_export_tbl.[3MonthTotalRecord$] DESC , Wholesale_Group_1_export_tbl.[6MonthTotalRecords$] DESC , Wholesale_Group_1_export_tbl.[9MonthTotalRecords$] DESC;[/sql]
|