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

Content with tags T-SQL, CTE Rss

   Items 1 to 20 of 27    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 | 20,023 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,720 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,258 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,660 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,929 reads

CTE

By Samith C 2013/09/25 | Category: cte
Rating: (not yet rated) |  Discuss |   Briefcase | 2,842 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,006 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,535 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 | 3,000 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 | 20,023 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

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

Hidden RBAR: Counting with Recursive CTE's

"Counting" is essential to many high performance code techniques. SQL Server MVP, Jeff Moden, shows us how to make sure that we're "Counting" and not "Crippling" our trick-code.  Read more...
By Jeff Moden 2011/08/08 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 11,556 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,535 reads

Concatenating Rows

Often in database design we store different values in rows to take advantage of a normalized design. However many times we need to combine multiple rows of data into one row for a report of some sort. New author Carl P. Anderson brings us some interesting T-SQL code to accomplish this.  Read more...
By Carl P. Anderson 2011/03/04 (first published: 2009/10/14) | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 147,307 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,006 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,422 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,929 reads

An Urgent Ad Hoc Report

In this new article, Yakov Shlafman shows us how he wrote a quick ad hoc report of expenses so that he could leave on time one day.  Read more...
By Yakov Shlafman 2010/03/17 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 8,043 reads
   Items 1 to 20 of 27    Older >>
 
Tags
recursion (6)    
common table expressions (cte) (3)    
row_number() (3)    
blogs (2)    
tally table (2)    
cursor (1)    
date manipulation (1)    
datediff (1)    
derived table (1)    
duplicate (1)    
ema (1)    
hierarchy (1)    
holiday (1)    
humor (1)    
ids to table (1)    
interstorm (1)    
lag (1)    
lead (1)    
macd (1)    
merge (1)    
michael davis (1)    
moving average (1)    
mstvf (1)    
output clause (1)    
partitioned sets (1)    
search (1)    
sma (1)    
sql server 2005 (1)    
sql spackle (1)    
string manipulation (1)    
string to table (1)    
table variables (1)    
table-valued function (1)    
window function (1)