On Mon, Apr 23, 2007 at 09:26:53AM -0400, Stephen Oberholtzer wrote:
On 4/22/07, Gilles Roy <[EMAIL PROTECTED]> wrote:
Given a arbitrary statement, I need to find out which row a specific
result is in, as efficiently as possible. The arbitrary statement can
order the results any way it wants.
Hi Roy,
If your statement "X" is represented below by "select ... Order by ..."
Then would the following give you what you're looking for??
create temp table Xtab as (select Order by );
select ROWID from xTab where MemberID=4567373;
(Without some "order by" clause, by the way
You don't have to read into a memory array. How about just running
through your selection with an sqlite3_step and counting the rows?
Gilles Roy wrote:
On Sun, Apr 22, 2007 at 05:33:43PM -0500, P Kishor wrote:
On 4/22/07, Gilles Roy <[EMAIL PROTECTED]> wrote:
Given a arbitrary statement, I
On 4/22/07, Gilles Roy <[EMAIL PROTECTED]> wrote:
Given a arbitrary statement, I need to find out which row a specific
result is in, as efficiently as possible. The arbitrary statement can
order the results any way it wants.
Let's say your resultset consists of 3 columns: memberid, lastname,
fi
> You could do this:
>
> SELECT COUNT(*) from X where memberid < 4567373
That assumes that you are sorting by memberid, of course...
Hugh
-
To unsubscribe, send email to [EMAIL PROTECTED]
---
> That is what I want to do. I want to know where the memberid is in
> the list (imagine the list was a waiting list or something). Is there
> not a way to just get the row number back? Is seems inefficient to
> have to allocate all of the memory to hold all of the results and
> then iterate th
On 4/22/07, Gilles Roy <[EMAIL PROTECTED]> wrote:
On Sun, Apr 22, 2007 at 05:33:43PM -0500, P Kishor wrote:
>On 4/22/07, Gilles Roy <[EMAIL PROTECTED]> wrote:
>>Given a arbitrary statement, I need to find out which row a specific
>>result is in, as efficiently as possible. The arbitrary statement
On Sun, Apr 22, 2007 at 05:33:43PM -0500, P Kishor wrote:
On 4/22/07, Gilles Roy <[EMAIL PROTECTED]> wrote:
Given a arbitrary statement, I need to find out which row a specific
result is in, as efficiently as possible. The arbitrary statement can
order the results any way it wants.
what do yo
Your question is so confusing that I am going to assume there is
something you have not been able to express in the asking of it --
On 4/22/07, Gilles Roy <[EMAIL PROTECTED]> wrote:
Given a arbitrary statement, I need to find out which row a specific
result is in, as efficiently as possible. The
Why not use a "where member_id = '4567373'?
Gilles Roy wrote:
Given a arbitrary statement, I need to find out which row a specific
result is in, as efficiently as possible. The arbitrary statement can
order the results any way it wants.
For example, imagine statement X which returns a column
10 matches
Mail list logo