Re: [sqlite] update to limits infomation

2013-02-06 Thread Leslie S Satenstein
LINUX SYSTEM. mailto:lsatenst...@yahoo.com alternative: leslie.satenst...@itbms.biz www.itbms.bizĀ  www.eclipseguard.com --- On Mon, 2/4/13, YAN HONG YE <yanhong...@mpsa.com> wrote: From: YAN HONG YE <yanhong...@mpsa.com> Subject: [sqlite] update to limits infomation To: &

Re: [sqlite] update to limits infomation

2013-02-05 Thread James K. Lowden
On Tue, 5 Feb 2013 01:22:37 + YAN HONG YE wrote: > I hava a table like this: > id,name,score,rank > 1,anna,80,0 > 2,qera,65,0 > 6,kero,90,0 > 10,rosa,95,0 > > what I would like to do is to update the rank position. I have this, The rank can be derived, obviating the

Re: [sqlite] update to limits infomation

2013-02-04 Thread Yongil Jang
Suggestion for new development item of sqlite? I just mentioned this idea because of I thought that it is helpful for the others if it can be implemented. Your answer is correct. But, n x n times of comparation would be occurred to count bigger number to set rank of each record in mytable can

Re: [sqlite] update to limits infomation

2013-02-04 Thread Igor Tandetnik
On 2/4/2013 9:37 PM, Yongil Jang wrote: For example, if sqlite supports sequence() function that returns current sequence number of result set then it can be used for this case, doesn't it? If SQLite supported such a function, then it could be used. But it doesn't, so it can't. I'm not sure

Re: [sqlite] update to limits infomation

2013-02-04 Thread Yongil Jang
I have a question. For example, if sqlite supports sequence() function that returns current sequence number of result set then it can be used for this case, doesn't it? ex) select sequence(), * from mytable order by score desc; 1, 10,rosa,95,0 2, 6,kero,90,0 3, 1,anna,80,0 4, 2,qera,65,0 This

Re: [sqlite] update to limits infomation

2013-02-04 Thread Igor Tandetnik
On 2/4/2013 8:22 PM, YAN HONG YE wrote: I hava a table like this: id,name,score,rank 1,anna,80,0 2,qera,65,0 6,kero,90,0 10,rosa,95,0 what I would like to do is to update the rank position. update mytable set rank = (select count(*) from mytable t2 where t2.score <= mytable.score); -- Igor

[sqlite] update to limits infomation

2013-02-04 Thread YAN HONG YE
I hava a table like this: id,name,score,rank 1,anna,80,0 2,qera,65,0 6,kero,90,0 10,rosa,95,0 what I would like to do is to update the rank position. I have this, update mytable set rank= 1 where max(score); update mytable set rank= 2 where max(score-1) ; the result should be like