Re: [sqlite] Retrieve Specific record number in one shot.
On Fri, Jul 09, 2010 at 08:12:20AM -0300, Israel Lins Albuquerque scratched on the wall: > Maybe do you want this! > > http://www.sqlite.org/syntaxdiagrams.html#select-stmt > > Select * From Product order by ProductName LIMIT 210 OFFSET 210; Close, but not quite. This will return rows 211 through 420. If you want row 210, you need "LIMIT 1 OFFSET 209". Or "LIMIT 209, 1" -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Intelligence is like underwear: it is important that you have it, but showing it to the wrong people has the tendency to make them feel uncomfortable." -- Angela Johnson ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Retrieve Specific record number in one shot.
Piyush Verma wrote: > I want to navigate to specific position in table for example I want > row number 210 inspite of nevigating one by one how can get that row. See if this helps: http://www.sqlite.org/cvstrac/wiki/wiki?p=ScrollingCursor -- Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Retrieve Specific record number in one shot.
Maybe do you want this! http://www.sqlite.org/syntaxdiagrams.html#select-stmt Select * From Product order by ProductName LIMIT 210 OFFSET 210; - "Piyush Verma" escreveu: > Hello All, > > I want to navigate to specific position in table for example I want > row number 210 inspite of nevigating one by one how can get that row. > > One way could be create a Index and use where clause to get that But > it's not useful in my case. > > I have table which have primary key, and product name(there is another > index for ProductName). Now I sort by Product name and want to access > row number 210. > > Is that a way to get it directly? > > like > > >>"Select * From Product order by ProductName" > >>move_to_row(210); > >>read row; > > > something like that. > > > > > -- > Thanks & Regards > > Piyush Verma > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- Atenciosamente/Regards, Israel Lins Albuquerque Desenvolvimento/Development Polibrás Brasil Software Ltda. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Retrieve Specific record number in one shot.
Hello All, I want to navigate to specific position in table for example I want row number 210 inspite of nevigating one by one how can get that row. One way could be create a Index and use where clause to get that But it's not useful in my case. I have table which have primary key, and product name(there is another index for ProductName). Now I sort by Product name and want to access row number 210. Is that a way to get it directly? like >>"Select * From Product order by ProductName" >>move_to_row(210); >>read row; something like that. -- Thanks & Regards Piyush Verma ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users