On Apr 20, 9:22 pm, Ed Murphy <emurph...@[EMAIL PROTECTED]
> wrote:
>.
> Replacing this:
>
> select c1, c2, rank() over (order by c1) r
> from t
> order by c1, c2
>
> with this:
>
> select ToTable(
> ToList(
> cursor(t order by c1)
> )
> )
> order by c1, c2
>
> is hardly a simplification.
>
It's not meant as a simplification but as a explanation of what being
done by rank(). As an aid to understanding, a visual aid if you will.
If you're using dataphor and an sql db for storage I'm not suggesting
you not use the sql rank(). I use rank() in an sql pass-through
query because it's easy and fast. Understanding<>code.
> > You may find this post interesting on the subject:
>
> > microsoft.public.sqlserver.programming
> > Oct 30 2007
> > 'Count Occurances in Select Statement'
> >http://www.themssforum.com/SQLServerDev/Count-Occurances-726289/
>
> is an equally artificial example and thus doesn't help.
>
> Assuming that such a practical situation does exist and I just don't
> know that it is (i.e. that Josh is not a sock puppet of yours), I
> would still prefer to see it expressed without explicit reference to
> a cursor:
>.
I would have to say that " (i.e. that Josh is not a sock puppet of
yours)" is an example of me running into Murphy's Law :(


|