Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Content with tag CTE Rss

   Items 1 to 20 of 35    Older >>
 

Exploring Recursive CTEs by Example

Recursive CTEs can be confusing and scary, so examining some non-standard examples may cast light upon these shadowy demons.  Read more...
By Dwain Camps 2014/07/25 (first published: 2012/07/17) | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 19,851 reads

CTE DML

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,078 reads

Cursor-Killing: Accessing Data in the Next Row

Cursors are considered by many to be the bane of good T-SQL. What are the best ways to avoid iterative T-SQL and to write queries that look and perform beautifully? This first part in an ongoing series of cursor-killing handles inter-row analysis.  Read more...
By Edward Pollack 2014/05/27 | Source: SQLServerCentral.com | Category: cte
Rating: |  Discuss |   Briefcase | 11,678 reads

Duplicate Detection and Management

Inevitably, every DBA is eventually asked to delete, merge, or otherwise report on duplicate data. There are many tools at our disposal to make this task both simple and efficient to complete. Read on for simple steps and examples to effectively deal with duplicate data.  Read more...
By Edward Pollack 2014/04/29 | Source: SQLServerCentral.com | Category: duplicate
Rating: |  Discuss |   Briefcase | 6,250 reads

Standard Deviations with CTE in SQL

I was working with a client recently getting the number of standard deviations a student was off the average number...  Read more...
By MikeDavis 2014/02/27 | Source: SQLServerCentral Blogs | Category: blogs
Rating: (not yet rated) |  Discuss |   Briefcase | 1,652 reads

Nesting Levels in SQL

The 'Structured' part of SQL denotes the fact that queries can be nested inside each other in such a way that, wherever you can use a table, you can use a table expression. Such derived tables can provide powerful magic, to which is added CTEs and Lateral Tables.   Read more...
By Additional Articles 2014/02/11 | Source: SimpleTalk | Category: structure
Rating:  Rate this |   Briefcase | 3,948 reads

How to Compare Rows within Partitioned Sets to Find Overlapping Dates

How to Compare Rows within Partitioned Sets to Find Overlapping, Contiguous, or Gap dates  Read more...
By Kevin Wu 2013/12/25 (first published: 2010/10/11) | Source: SQLServerCentral.com | Category: cte
Rating: |  Discuss |   Briefcase | 6,927 reads

CTE

By Samith C 2013/09/25 | Category: cte
Rating: (not yet rated) |  Discuss |   Briefcase | 2,839 reads

Sales Report on a View

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

Common table expressions and circular references

Finding circular references that are stopping your CTE from working.  Read more...
By Geoff Norman 2013/09/02 (first published: 2011/01/31) | Source: SQLServerCentral.com | Category: cte
Rating: |  Discuss |   Briefcase | 16,002 reads

Displaying Sorted Hierarchies (SQL Spackle)

Learn how you can query a hierarchy of data and also return the results in an ordered fashion. A handy T-SQL skill that you will use over and over again.  Read more...
By Jeff Moden 2013/08/23 (first published: 2011/03/10) | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 16,517 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 2013/07/23 | Source: SQLServerCentral.com | Category: tally
Rating: |  Discuss |   Briefcase | 1,100 reads

Generate N numbers

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

Multiple CTEs

Multiple CTEs It’s somewhat obscure in BOL and I wasn’t able to find any examples but it turns out you can...  Read more...
By Kenneth Fisher 2012/10/11 | Source: SQLServerCentral.com | Category: blogs
Rating: (not yet rated) |  Discuss |   Briefcase | 2,993 reads

Exploring Recursive CTEs by Example

Recursive CTEs can be confusing and scary, so examining some non-standard examples may cast light upon these shadowy demons.  Read more...
By Dwain Camps 2014/07/25 (first published: 2012/07/17) | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 19,851 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,168 reads

Pros and cons of six SQL table tools

This article shows how to use 6 SQL table-based tools to solve the same problem, and gives the pros and cons of each.  Read more...
By Andy Owl 2011/12/26 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 8,621 reads

Dealing with Incomplete Data - A T-SQL Puzzle 1

Client data received for processing may have invalid records based on processing requirements. Identifying and dealing with bad records in a specific scenario is the object of this article.  Read more...
By Suresh Maganti 2011/11/22 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 3,309 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 | 2,922 reads

Calculating Stock Returns Using the ROW_NUMBER function and CTEs

In finance, when pricing data isn't available on last day of week, month or year, calculating returns is tricky. This article addresses the issue.   Read more...
Rating: |  Discuss |   Briefcase | 5,383 reads
   Items 1 to 20 of 35    Older >>
 
Tags
t-sql (21)    
recursion (8)    
common table expressions (cte) (3)    
row_number() (3)    
blogs (2)    
cursor (2)    
tally table (2)    
counter (1)    
date manipulation (1)    
datediff (1)    
derived table (1)    
dml (1)    
duplicate (1)    
ema (1)    
hierarchy (1)    
holiday (1)    
howto (1)    
humor (1)    
ids to table (1)    
interstorm (1)    
lag (1)    
lateral tables (1)    
lead (1)    
list (1)    
loop (1)    
macd (1)    
merge (1)    
michael davis (1)    
moving average (1)    
mstvf (1)    
nested queries (1)    
output clause (1)    
partition (1)    
partitioned sets (1)    
pivot (1)    
recursive (1)    
search (1)    
sma (1)    
sql server 2005 (1)    
sql spackle (1)    
string manipulation (1)    
string to table (1)    
structure (1)    
table expression (1)    
table variables (1)    
table-valued function (1)    
tally (1)    
views (1)    
while (1)    
window function (1)