functions

External Article

Bowled Over by SQL Window Functions

  • Article

What better way to learn how to construct complex CHECK CONSTRAINTs, use the SQL 2012 window frame capability of the OVER clause and LEAD analytic function, as well as how to pivot rows into columns using a crosstab query? Create the SQL code to score Ten-pin Bowling, of course. Dwain Camps explains the how, what and why.

2015-02-12

10,399 reads

External Article

Lead and Lag Functions in SQL Server 2012

  • Article

Arshad Ali discusses how to use CTE and the ranking function to access or query data from previous or subsequent rows. He also shows you how to leverage the LEAD and LAG analytics functions to achieve the same result without writing a self-join query using CTE and ranking function

2014-12-10

8,382 reads

Technical Article

RE: dynamic sql vs. clustered index scan

  • Reply

Or you could keep your static SQL but rather than make use of your charindex statement, which cannot use any indices, you can use a UDF that returns a table. For example, this UDF will take a comma separated list of integers as a string and returns a table (I think I got this from […]

2005-05-24

Blogs

Daily Coping 1 Dec 2022

By

Today’s coping tip is to discover your artistic side. Design a friendly greeting card....

New Database Job – The 6 Month Plan

By

So, we made it through our first 90 days, things start getting tougher now...

SQL Homework – December 2022 – What’s new in SQL Server?

By

SQL Server 2022 has been released! Long live SQL Server! No really, I’ve still...

Read the latest Blogs

Forums

Merge String into single string

By sabarishbabu

Hello Team, I have a input fields like below with fixed value separator (6) ...

How to get intellisense on CLR types in SQL Server Management Studio

By FirstByte

I created a CLR user defined type in C#/Visual Studio and added it to...

Display Top N values of a table with calculation next to it

By Soof1234

Hi, In Power BI Report Builder I need to use SSRS code for my...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers