Re: [sqlite] Sqlite query to get the offset of an entry in the list

2018-04-28 Thread Balaji Ramanathan
SELECT COUNT(*) FROM TABLE WHERE NAME <= (SELECT NAME FROM TABLE WHERE ID = 3 ORDER BY NAME ASC) Balaji Ramanathan ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Sqlite query to get the offset of an entry in the list.

2018-04-27 Thread x
Hegde, Deepakakumar (D.) Sent: Friday, April 27, 2018 3:51:27 PM To: sqlite-users@mailinglists.sqlite.org Subject: [sqlite] Sqlite query to get the offset of an entry in the list. Hi All, We have a requirement where in offset of the primary key ID is needed as per the sorted list. Table: ID NA

Re: [sqlite] Sqlite query to get the offset of an entry in the list.

2018-04-27 Thread Keith Medcalf
: SQLite mailing list >Subject: Re: [sqlite] Sqlite query to get the offset of an entry in >the list. > >SELECT COUNT(*)+1 FROM TABLE WHERE NAME < (SELECT NAME FROM TABLE >WHERE ID = 3) > > > >(I think) > > > > >From: sqlite

Re: [sqlite] Sqlite query to get the offset of an entry in the list.

2018-04-27 Thread Keith Medcalf
ers [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Simon Davies >Sent: Friday, 27 April, 2018 09:35 >To: SQLite mailing list >Subject: Re: [sqlite] Sqlite query to get the offset of an entry in >the list. > >On 27 April 2018 at 15:51, Hegde, Deepakakumar (D.) > wrote:

Re: [sqlite] Sqlite query to get the offset of an entry in the list.

2018-04-27 Thread Keith Medcalf
anticipated traffic volume. >-Original Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Hegde, Deepakakumar >(D.) >Sent: Friday, 27 April, 2018 08:51 >To: sqlite-users@mailinglists.sqlite.org >Subject: [sqlite] Sqlite q

Re: [sqlite] Sqlite query to get the offset of an entry in the list.

2018-04-27 Thread x
ite query to get the offset of an entry in the list. Hi All, We have a requirement where in offset of the primary key ID is needed as per the sorted list. Table: ID NAME 1 AAA 2 ZZZ 3 BBB 4 WWW 5 CCC Now need to get the offset of the ID 3 in the sorted list of

Re: [sqlite] Sqlite query to get the offset of an entry in the list.

2018-04-27 Thread Simon Davies
On 27 April 2018 at 15:51, Hegde, Deepakakumar (D.) wrote: > Hi All, > > We have a requirement where in offset of the primary key ID is needed as per > the sorted list. . . . > 1 AAA > 3 BBB > 5 CCC > 4 WWW > 2 ZZZ > > So position of ID 3 as per the sorted list of the NAME is 2. sqlite

[sqlite] Sqlite query to get the offset of an entry in the list.

2018-04-27 Thread Hegde, Deepakakumar (D.)
Hi All, We have a requirement where in offset of the primary key ID is needed as per the sorted list. Table: ID NAME 1 AAA 2 ZZZ 3 BBB 4 WWW 5 CCC Now need to get the offset of the ID 3 in the sorted list of the NAME. SELECT * FROM TABLE ORDER BY NAME ASC