Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««1234

The OVER Clause enhancements in SQL Server code named “Denali”, CTP3 Expand / Collapse
Author
Message
Posted Friday, August 26, 2011 9:31 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: 2 days ago @ 3:30 PM
Points: 1,525, Visits: 1,833
Evil Kraig F (8/25/2011)
Wayne,

Excellent examples and a solid walkthrough, thank you.

Btw, for your question about real-use of range, you'd have to wrap the results in a distinct.

I'm thinking of log-entries. If you want by day-running totals, you'd do a by range and then distinct the results on the summed columns and the leading identifiers. This way if 2 ppl worked on a project 1 day and 10 people the next you could still have 2 rows, one identifying each day after the distinct with the correct totals.


Ah! Great example - thanks!
Post #1166180
Posted Saturday, August 27, 2011 9:46 PM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: 2 days ago @ 1:05 PM
Points: 535, Visits: 726
I had no idea you could use PARTITION BY with things like MIN, MAX, COUNT, etc.

Thank you for the article!



Post #1166646
Posted Sunday, August 28, 2011 8:01 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 10:42 AM
Points: 6,544, Visits: 8,757
mishaluba (8/27/2011)
I had no idea you could use PARTITION BY with things like MIN, MAX, COUNT, etc.

Thank you for the article!

You're welcome... and I'm glad you've learned from it!


Wayne
Microsoft Certified Master: SQL Server 2008
If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
Links: For better assistance in answering your questions, How to ask a question, Performance Problems, Common date/time routines,
CROSS-TABS and PIVOT tables Part 1 & Part 2, Using APPLY Part 1 & Part 2, Splitting Delimited Strings
Post #1166671
Posted Tuesday, August 30, 2011 5:45 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 11:50 AM
Points: 4,914, Visits: 8,652
Nice article, Wayne!
And I also liked your post on the performance comparison on your blog.
Cool stuff. Thank you.


--
Gianluca Sartori

Get your two-cent-answer quickly
spaghettidba.com
@spaghettidba
Post #1167412
Posted Tuesday, August 30, 2011 7:09 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 10:42 AM
Points: 6,544, Visits: 8,757
Gianluca, I'm glad that you liked both the article and the blog. Thanks!

Wayne
Microsoft Certified Master: SQL Server 2008
If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
Links: For better assistance in answering your questions, How to ask a question, Performance Problems, Common date/time routines,
CROSS-TABS and PIVOT tables Part 1 & Part 2, Using APPLY Part 1 & Part 2, Splitting Delimited Strings
Post #1167865
« Prev Topic | Next Topic »

Add to briefcase «««1234

Permissions Expand / Collapse