Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rank Account Transaction by Year and Week

Status
Not open for further replies.

JustATheory

IS-IT--Management
Feb 27, 2003
115
US
Greetings,

I have a table that lists Account and Date of Transaction, and I need to add two columns YearRank that lists sequentially each time a transaction occurs by account by year, and then it's rank within a week’s timeframe. I did this years ago in Access and can’t find the code, as I recall it was using the count(*) in a subquery, but I’m not getting the expected results. Any help is greatly appreciated.

Thanks,
JustATheory

Existing Need to add Need to add
Account Date YearRank WeeklyRank
123 1/3/2010 1 1
246 1/3/2010 1 1
123 2/1/2010 2 1
246 1/15/2010 2 1
246 1/16/2010 3 2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top