• subscribe


Itzik Ben-Gan

Itzik Ben-Gan is a cofounder of and mentor with SolidQ. He teaches, lectures, and consults internationally. He's a SQL Server MVP and is the author of several books about T-SQL, including Microsoft SQL Server 2012 High-Performance T-SQL Using Window Functions (Microsoft Press).

Click here to check out Itzik's Puzzled by T-SQL blog.

Email: itzik@solidq.com

My Latest Content
My Latest Comments



Author Articles

SQL Server 2012: How to Write T-SQL Windows Functions, Part 3

By Itzik Ben-Gan, 01/26/2012

Itzik wraps up his discussion of SQL Server 2012's window functions by focusing on optimization. He provides indexing guidelines for optimal performance, and he describes cases ...

Microsoft SQL Server 2012: How To Write T-SQL Window Functions, Part 2

By Itzik Ben-Gan, 12/13/2011

SQL Server 2012 enhances support for window aggregate functions. In part 2 of this series, Itzik discusses window offset functions and window distribution functions.

How to Use Microsoft SQL Server 2012's Window Functions, Part 1

By Itzik Ben-Gan, 11/21/2011

SQL Server 2012 enhances support for window aggregate functions by introducing window order and frame clauses, support for offset functions, and support for window distribution ...

T-SQL String Manipulation Tips and Techniques, Part 2

By Itzik Ben-Gan, 10/26/2011

Itzik explains how to handle type conversions when you need to convert a character string value to another type, in both SQL Server 2008 and SQL Server Denali.

T-SQL String Manipulation Tips and Techniques, Part 1

By Itzik Ben-Gan, 09/14/2011

Learn about some common string manipulation tasks, such as counting occurrences of a substring within a string, verifying an exact number of occurrences of a substring within a ...

Use T-SQL to Generate a Sequence

By Itzik Ben-Gan, 08/16/2011

Itzik presents a real-world T-SQL challenge that involves generating a sequence of license plates.

SQL Server 2005’s APPLY, Part 2

By Itzik Ben-Gan, 07/25/2011

More advanced uses of the APPLY table operator include efficient parallelism of queries, reuse of column aliases, aggregate over columns, unpivoting, and inlining scalar functions.

SQL Server 2005’s Apply, Part 1

By Itzik Ben-Gan, 06/20/2011

The APPLY table operator accepts two table expressions as input and applies the right table expression to each row from the left, allowing correlations from the right table ...

Sequences, Part 2

By Itzik Ben-Gan, 05/23/2011

SQL Server Denali’s sequences feature provides several advantages over the IDENTITY column property. Learn how to cache sequence values, obtain a range of sequence values, and ...

T-SQL Foundations: Thinking in Sets

By Itzik Ben-Gan, 04/20/2011

Itzik discusses the foundations of set theory and explains why it’s important to think in terms of sets when addressing querying tasks rather than thinking in iterative or cursor ...

Sequences, Part 1

By Itzik Ben-Gan, 04/17/2011

SQL Server Denali provides support for sequences, which are more flexible than the IDENTITY column property and offer several advantages over IDENTITY.

OFFSET/FETCH, Part 2

By Itzik Ben-Gan, 03/11/2011

Itzik continues his discussion of the new SQL Server filter called OFFSET/FETCH. He explains the use of the filter in table expressions, logical query processing, modifications, ...

OFFSET/FETCH, Part 1

By Itzik Ben-Gan, 02/14/2011

SQL Server 11 introduces a new filter called OFFSET/FETCH that allows filtering a requested range of rows based on given ordering, a number of rows to skip, and a number of rows ...

Unpivoting Data

By Itzik Ben-Gan, 01/25/2011

Unpivoting involves rotating data from a state of columns to a state of rows. Itzik presents three techniques to unpivot data, based on the UNPIVOT operator, a cross join, and the ...

Row Value Constructor

By Itzik Ben-Gan, 11/17/2010

Future versions of SQL Server would benefit from support for the row value constructor feature, which makes code less verbose, more readable, and easier to maintain.

Flattening Hierarchies

By Itzik Ben-Gan, 10/25/2010

Learn techniques for flattening hierarchies that you can use to convert hierarchies represented as adjacency lists to a flattened form.

Pivoting Data

By Itzik Ben-Gan, 10/22/2010

Itzik discusses standard traditional techniques for pivoting, as well as nonstandard techniques that rely on the newer native PIVOT operator. He explains the advantages and ...

Query Filters Based on Number of Rows and Logical Ordering

By Itzik Ben-Gan, 09/20/2010

Use the TOP, FETCH FIRST, and TOP OVER filters to improve your T-SQL queries.

Predicate-Based Query Filters

By Itzik Ben-Gan, 08/23/2010

Itzik explains the intricacies of working with query filters that are based on predicates.