Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft SQL Server > Re: The Sql ran...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 7 Topic 10981 of 11517
Post > Topic >>

Re: The Sql ranking OVERture

by steve <rog11228@[EMAIL PROTECTED] > Apr 21, 2008 at 05:52 PM

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 :(
 




 7 Posts in Topic:
The Sql ranking OVERture
steve <rog11228@[EMAIL  2008-04-19 21:59:12 
Re: The Sql ranking OVERture
Ed Murphy <emurphy42@[  2008-04-20 15:49:11 
Re: The Sql ranking OVERture
steve <rog11228@[EMAIL  2008-04-20 19:18:18 
Re: The Sql ranking OVERture
Ed Murphy <emurphy42@[  2008-04-20 21:22:44 
Re: The Sql ranking OVERture
steve <rog11228@[EMAIL  2008-04-21 17:52:23 
Re: The Sql ranking OVERture
B D Jensen <bjorn.d.je  2008-04-23 06:42:48 
Re: The Sql ranking OVERture
steve <rog11228@[EMAIL  2008-04-23 15:55:02 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Dec 3 1:02:55 CST 2008.