View Full Version : help with rank query- everything gets ranked the same!


nickos
06-26-2006, 03:07 AM
Hi All,

I'm having a problem with my rank query......I have some unique integers that are all being ranked the same.

Sample values in dates table, stored as numbers:

[date]
200544
200545
200546
200547
etc

I'm using the rank example from the MS website, as follows:

rank: (Select Count(*) from dates Where [date] < [dates].[date];)

I get a rank of zero for every value!

I've tried running this in the MS sample DB and it works fine.

Any insight appreciated!

Cheers,

N

nickos
06-26-2006, 03:54 AM
Looks like you must name an alias for the table/query being used.

Problem solved.........