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,
"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?
>>>
>>
>>
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
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
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
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
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
7 matches
Mail list logo