SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Scripts with tag CTE Rss

Search for any content tagged cte

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Add a script

   Items 1 to 8 of 8   

Calculate Age (in years)

An inline table valued function (iTVF) that can be used to calculate age in years.  Read more...
By Alan Burstein 2016/04/27 | Source: SQLServerCentral.com | Category: date
Rating: |  Discuss |   Briefcase | 899 reads


This script is an example explaining how to write DML using CTE.  Read more...
By kbhanu15 2014/07/23 | Source: SQLServerCentral.com | Category: dml
Rating: |  Discuss |   Briefcase | 1,657 reads

Sales Report on a View

Sales Report based on a single view 
By Sergiu Ungureanu 2013/09/17 | Source: SQLServerCentral.com | Category: cte
Rating: |  Discuss |   Briefcase | 1,402 reads

Virtual tally table function

An inline table-valued function (iTVF) that will produce a virtual tally table on-the-fly. The function creates a tally table of any size with user-defined lower and upper bounds.  Read more...
By Steven Willis 2014/09/08 | Source: SQLServerCentral.com | Category: tally
Rating: |  Discuss |   Briefcase | 2,098 reads

Generate N numbers

Reursive CTE Script to generate n numbers 
By Harsha Majety 2013/04/17 | Source: SQLServerCentral.com | Category: recursion
Rating: |  Discuss |   Briefcase | 1,421 reads

Convert a string list to TABLE with single CTE query

Converts a string list into a table using a single query, no variables and no helper functions.  Read more...
By Dimitris Staikos 2012/05/11 | Source: SQLServerCentral.com | Category: cte
Rating: |  Discuss |   Briefcase | 2,254 reads

Display multiple rows values as single row value (Different Columns)

Display multiple rows values as single row value in different rows (No Cursor).  Read more...
Rating: |  Discuss |   Briefcase | 3,007 reads

Search all columns in every table for a value

This script allows a user to search every field in a database for a specified value - handy when knowing the data but not the schema.  Read more...
By Michael Davis 2010/11/09 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 4,484 reads
   Items 1 to 8 of 8