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

Guest Columnist: Jeff Moden

SQLServerCentral.com profile

   Items 1 to 20 of 23    Next 20 >>
 

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

Tally OH! An Improved SQL 8K “CSV Splitter” Function

The Tally Table has proven to be a simple and elegant method for avoiding many varieties of RBAR. Unfortunately, one of its more common uses, that of a CSV splitter, has a well-known and serious performance problem. MVP Jeff Moden shows us what that problem is and how to correct it. (UPDATED with additional info and attachments on 5/12/2011).  Read more...
By Jeff Moden 2011/05/02 | Source: SQLServerCentral.com | Category: tally table
Rating: |  Discuss |  Briefcase | 15,154 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 2011/03/10 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |  Briefcase | 9,651 reads

Display More Than 8000 Characters (SQL Spackle)

SQL Server MVP Jeff Moden shows us a quick and dirty bit of SQL Spackle to display the content of VARCHAR(MAX) and NVARCHAR(MAX).  Read more...
By Jeff Moden 2011/01/27 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |  Briefcase | 10,531 reads

Formatting Dates with 3 Character Months (SQL Spackle)

Another in the series of articles to help you "fill in the cracks" in your T-SQL knowledge. MVP Jeff Moden shows us a super simple, high performance method to solve this timeless problem.  Read more...
By Jeff Moden 2011/01/20 | Source: SQLServerCentral.com | Category: formatting
Rating: |  Discuss |  Briefcase | 10,091 reads

Hidden Formatting Troubles with STR() (SQL Spackle)

Fill in another bit of your T-SQL knowledge about STR(). It right justifies, rounds, and controls the output width of columns. Sounds perfect but here's why you might not want to use it.  Read more...
By Jeff Moden 2010/12/15 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |  Briefcase | 6,195 reads

Group Islands of Contiguous Dates (SQL Spackle)

Fill in another bit of your T-SQL knowledge by learning how to quickly group ranges of contiguous dates without RBAR.  Read more...
By Jeff Moden 2010/12/07 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |  Briefcase | 7,530 reads

Why doesn’t ISNUMERIC work correctly? (SQL Spackle)

Another in our series of articles to help you fill in the cracks in your knowledge with SQL Spackle. MVP Jeff Moden shows us how IsNumeric works and how you should use it.  Read more...
By Jeff Moden 2010/12/01 | Source: SQLServerCentral.com | Category: isnumeric
Rating: |  Discuss |  Briefcase | 18,029 reads

Sorting Months By Number (SQL Spackle)

Fill in another bit of your T-SQL knowledge by learning how to sort a result set by the proper month order, but use the month name instead.  Read more...
By Jeff Moden 2010/11/15 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |  Briefcase | 10,208 reads

Dissecting SQL Server Execution Plans

A review of MVP Grant Fritchey's "Dissecting Execution Plans". This is one book that you'll want on your bookshelf.  Read more...
By Jeff Moden 2009/12/17 | Source: SQLServerCentral.com | Category: book reviews
Rating: |  Discuss |  Briefcase | 4,284 reads

What's in your CLR?

For today's Friday poll we have a guest editorial from Jeff Moden. The head of the anti-RBAR alliance has spent a lot of time trying to help others write better T-SQL and solve their problems with code that performs well. However this Friday Jeff asks about the CLR and how you are using it, or not using it, in the real world.  Read more...
By Jeff Moden 2009/12/11 | Source: SQLServerCentral.com | Category: editorial
Rating: |  Discuss |  Briefcase | 385 reads

Solving the Running Total and Ordinal Rank Problems (Rewritten)

Revisiting his very popular article on the running total and ordinal rank problems, MVP Jeff Moden brings us a detailed analysis of how you might want to implement a solution in T-SQL.  Read more...
By Jeff Moden 2012/01/27 (first published: 2009/11/10) | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |  Briefcase | 22,017 reads

REPLACE Multiple Spaces with One

Replacing multiple spaces with a single space is an old problem that people use loops, functions, and/or Tally tables for. Here's a set based method from MVP Jeff Moden.  Read more...
By Jeff Moden 2011/03/18 (first published: 2009/11/16) | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |  Briefcase | 30,781 reads

Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs

In Part 1, we learned how to make both Cross-Tabs and Pivots. In Part 2, we'll learn how to automate a very common type of Cross-Tab report and maybe learn some extra tricks on the way.  Read more...
By Jeff Moden 2010/04/30 (first published: 2008/12/03) | Source: SQLServerCentral.com | Category: crosstab
Rating: |  Discuss |  Briefcase | 34,593 reads

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns

An "old" subject is revisted where "newbies" can learn the methods and veteran users can get more performance out of the code.  Read more...
By Jeff Moden 2010/08/06 (first published: 2008/08/19) | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |  Briefcase | 82,803 reads

Passing Parameters as (almost) 1, 2, and 3 Dimensional Arrays

It's a well known fact that there's no such thing as a true "array" in SQL Server and that you can't pass a table as a parameter... but you can get a lot closer than you think.  Read more...
By Jeff Moden 2010/01/08 (first published: 2008/05/22) | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |  Briefcase | 27,322 reads

The "Numbers" or "Tally" Table: What it is and how it replaces a loop.

Many people have used a "Numbers" or "Tally" table without really knowing what it does. This is an introduction as to how a Tally table replaces a loop.  Read more...
By Jeff Moden 2008/05/07 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |  Briefcase | 60,353 reads

More RBAR and "Tuning" UPDATEs

SQL Server expert Jeff Moden discusses a common problem seen in many update statements.  Read more...
By Jeff Moden 2008/03/14 | Source: SQLServerCentral.com | Category: performance tuning
Rating: |  Discuss |  Briefcase | 11,051 reads

Solving the "Running Total" & "Ordinal Rank" Problems in SS 2k/2k5

Learn how to solve a couple of common T-SQL issues with MVP Jeff Moden.  Read more...
By Jeff Moden 2008/01/31 | Source: SQLServerCentral.com | Category: advanced querying
Rating: |  Discuss |  Briefcase | 14,215 reads

Performance Tuning: Concatenation Functions and Some Tuning Myths

Rumor has it that Concatenation functions have gotten the nasty reputation of being "performance hogs". Here's why that's not true.  Read more...
By Jeff Moden 2008/01/01 | Source: SQLServerCentral.com | Category: test data
Rating: |  Discuss |  Briefcase | 13,681 reads
   Items 1 to 20 of 23    Next 20 >>