Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

what is the use of Over Clause Expand / Collapse
Author
Message
Posted Monday, December 9, 2013 6:33 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, March 21, 2016 11:37 AM
Points: 187, Visits: 394
I would like to know when and how to use over clause in sql 20012 with proper example.
Post #1521053
Posted Monday, December 9, 2013 6:50 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 8:01 AM
Points: 1,920, Visits: 10,801
There are several very good examples in Technet: http://technet.microsoft.com/en-us/library/ms189461.aspx

Another example, using it within Row_Number: http://sqlrambling.net/2013/11/04/row_number-basic-example/


Steve Hall
Linkedin
Blog Site
Post #1521060
Posted Monday, December 9, 2013 12:10 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 4:04 PM
Points: 2,065, Visits: 6,914
Here's a good article by Robert Sheldon with some examples:

Working with Window Functions in SQL Server



-- Alan Burstein



Best practices for getting help on SQLServerCentral
Need to split a string? Try DelimitedSplit8K or DelimitedSplit8K_LEAD (SQL 2012+)
Need a pattern-based splitter? Try PatternSplitCM
Need to remove or replace those unwanted characters? Try PatExclude8K and PatReplace8K.

"I can't stress enough the importance of switching from a 'sequential files' mindset to 'set-based' thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code. " -- Itzek Ben-Gan 2001
Post #1521260
Posted Friday, December 13, 2013 10:25 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 4:04 PM
Points: 2,065, Visits: 6,914
Duh... Here's a few more

http://www.sqlservercentral.com/Forums/Topic1519856-824-29.aspx#bm1522006


-- Alan Burstein



Best practices for getting help on SQLServerCentral
Need to split a string? Try DelimitedSplit8K or DelimitedSplit8K_LEAD (SQL 2012+)
Need a pattern-based splitter? Try PatternSplitCM
Need to remove or replace those unwanted characters? Try PatExclude8K and PatReplace8K.

"I can't stress enough the importance of switching from a 'sequential files' mindset to 'set-based' thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code. " -- Itzek Ben-Gan 2001
Post #1522792
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse