Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 partition by distincts

Author  Topic 

sqlclarify
Yak Posting Veteran

56 Posts

Posted - 2009-05-10 : 02:55:51
Does adding distincts to a query interfere with partition by..?

I have a query

select
col1,
col2
sum col3 over (partition by col1)
from etc.etc.
which works fine if I don't add distinct to the select clause. But if I add distinct I get strange results. Does partition by get executed last in the query. Just curious.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-05-10 : 03:20:53
duplicate

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=125392
Go to Top of Page
   

- Advertisement -