Re: [sqlite] Updating rank field by points in stats table.

2008-06-27 Thread Pejayuk
@ Igor - Thank you thats a fantastic example. :D @ Gerry - Thanks. Your right. Diplicates are ranked one point below. Your right, Instead of joint points being ranked as 3rd place, they are being ranked at the lowest rank. This is what I will end up using. update stats set rank = (select count(*)

Re: [sqlite] Updating rank field by points in stats table.

2008-06-26 Thread Gerry Snyder
Igor Tandetnik wrote: > "Pejayuk" <[EMAIL PROTECTED]> wrote in > message news:[EMAIL PROTECTED] > >> I have a player stats table with a points field. >> I want to update the rank in this using a single query based on the >> points in the row. >> I am not that good at complex sql but I have

Re: [sqlite] Updating rank field by points in stats table.

2008-06-26 Thread Igor Tandetnik
"Pejayuk" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have a player stats table with a points field. > I want to update the rank in this using a single query based on the > points in the row. > I am not that good at complex sql but I have managed to get the > result I want from

[sqlite] Updating rank field by points in stats table.

2008-06-26 Thread Pejayuk
I have a player stats table with a points field. I want to update the rank in this using a single query based on the points in the row. I am not that good at complex sql but I have managed to get the result I want from the following select query. SELECT points,(SELECT COUNT(*) FROM stats b WHERE