If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Ranking based on Multiple Data Fields
I am trying to Rank a field based on multiple sort criteria. My query sorts
correctly, but the Ranking assignments are not correct. Could someone please review my SQL query and let me know how to correct this problem? I need to sort Descending by [Type2] AS WELL AS Descending by [Ext B/O] I used the following to assign my [Type2] field data: Type2: IIf([All BO]=100 And [Host DN]=20000,3,(IIf([Host DN]=20000,2,(IIf([All BO]=100,1))))) I am currently using the following to create my Ranking: Rank: (SELECT Count([VT].[Ext BO]) FROM [tmp_tbl_Chart5a_1] AS VT WHERE VT.[Ext BO] tmp_tbl_Chart5a_1.[Ext BO])+1 I know the Ranking I used sorts ONLY on the [Ext BO] field but I am not a coder and do not know how to modify the format of my query to get what I need. Can someone please help?? Thanks, -- Chip |
Thread Tools | |
Display Modes | |
|
|