Igor Tandetnik wrote:
> Well, there's no way to tell how records with the same Date are going to
> end up ordered in the original query. If you impose some deterministic
> order there, e.g. with
>
> ORDER BY Date, Id
>
> then you can do something like this:
>
> select count(*)
> from Data d, (sel
"Dennis Volodomanov"
wrote in message news:4a1e80dd.9040...@psunrise.com
> Igor Tandetnik wrote:
>>> and let's say, "Data" has an "ID" field (primary index).
>>>
>>> Is it possible to find out the *position* in the returned result set
>>> of a Data with a given ID?
>>>
>>
>> select count(*) from D
Igor Tandetnik wrote:
>> and let's say, "Data" has an "ID" field (primary index).
>>
>> Is it possible to find out the *position* in the returned result set
>> of a Data with a given ID?
>>
>
> select count(*) from Data
> where PlotOnGraph=1
> and Date < (select Date from Data where ID=?);
Hello all,
I'm not sure if this can be done in SQL, but if it can, I'd appreciate
your help.
Let's say I've got this query:
SELECT * FROM (SELECT * FROM Data WHERE PlotOnGraph=1 ORDER BY Date ASC)
LIMIT ?2 OFFSET ?1
and let's say, "Data" has an "ID" field (primary index).
Is it possible to f
Igor Tandetnik wrote:
> Dennis Volodomanov wrote:
>
>> Let's say I've got this query:
>>
>> SELECT * FROM (SELECT * FROM Data WHERE PlotOnGraph=1 ORDER BY Date
>> ASC) LIMIT ?2 OFFSET ?1
>>
>
> Why an extra layer? Why not just
>
> SELECT * FROM Data WHERE PlotOnGraph=1 ORDER BY Date ASC
>
Dennis Volodomanov wrote:
> Let's say I've got this query:
>
> SELECT * FROM (SELECT * FROM Data WHERE PlotOnGraph=1 ORDER BY Date
> ASC) LIMIT ?2 OFFSET ?1
Why an extra layer? Why not just
SELECT * FROM Data WHERE PlotOnGraph=1 ORDER BY Date ASC
LIMIT ?2 OFFSET ?1
> and let's say, "Data" has a
Hello all,
I'm not sure if this can be done in SQL, but if it can, I'd appreciate
your help.
Let's say I've got this query:
SELECT * FROM (SELECT * FROM Data WHERE PlotOnGraph=1 ORDER BY Date ASC)
LIMIT ?2 OFFSET ?1
and let's say, "Data" has an "ID" field (primary index).
Is it possible to f
7 matches
Mail list logo