Hi,
I read the "solution" and immediately thought that the real problem is putting the right data into the "rank" field. I have solved that problem and it does not require a cursor or a table ( unless, of course, you want one just because you want one ). Here is what is needed to rank states...