Hi all,
I have an issue where I'm calculating awards for people, but one of them is worked out by the person with the most points in certain categories, but if they won in the previous 2 years, then it goes to the person with the next highest points etc.
Now, each PERSON has their own unique person ID and then each show, they are given a unique entrant ID, which may be different from previous years.
I was thinking of doing something to make a new table of the winners of this award, with something like EntrantID, PersonID, Date and AwardID
And then comparing the winners against this table. Now, I'd need to arrange this by date decending and then use an SQL statement of something like "Select TOP 2..."
I'd then need to possibly put these two results into variables and then in a bit of VBA and SQL, make it so that IF NOT EQUAL to variable 1 or variable 2, then give that person the award, ELSE give award to someone else.
I am just struggling with the best way to implement this...
Any Advice would be really warmly welcomed.
I have an issue where I'm calculating awards for people, but one of them is worked out by the person with the most points in certain categories, but if they won in the previous 2 years, then it goes to the person with the next highest points etc.
Now, each PERSON has their own unique person ID and then each show, they are given a unique entrant ID, which may be different from previous years.
I was thinking of doing something to make a new table of the winners of this award, with something like EntrantID, PersonID, Date and AwardID
And then comparing the winners against this table. Now, I'd need to arrange this by date decending and then use an SQL statement of something like "Select TOP 2..."
I'd then need to possibly put these two results into variables and then in a bit of VBA and SQL, make it so that IF NOT EQUAL to variable 1 or variable 2, then give that person the award, ELSE give award to someone else.
I am just struggling with the best way to implement this...
Any Advice would be really warmly welcomed.