This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
SQL SERVER - Select Columns from Stored Procedure Resultset

SQL SERVER – Select Columns from Stored Procedure Resultset

September 26, 2013
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Stored Procedure

Need only some columns from a stored procedure resultset? Store it in a temp table with INSERT INTO and EXEC, then select what you need.

Read More
SQL SERVER - How to Access the Previous Row and Next Row value in SELECT statement? - Part 4

SQL SERVER – How to Access the Previous Row and Next Row value in SELECT statement? – Part 4

September 25, 2013
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server, SQL Table Operation

Part 4 on reading the previous row and next row value in a SELECT statement. My friend Szymon Wojcik shows how a numbers table can make the query even faster.

Read More
Hands sorting loose screws and nuts into a muffin tin, one cup empty and one bent screw set apart

Turning Key-Value Pairs Into Columns for Reporting

September 19, 2013
Pinal Dave
SQL Tips and Tricks
PIVOT and UNPIVOT, SQL Reports, SQL Scripts, SQL Server

Turn key-value pairs into reporting columns with conditional aggregation and PIVOT, handle missing values and conversions.

Read More
SQL SERVER - Simple Puzzle with UNION - Part 5

SQL SERVER – Simple Puzzle with UNION Part 5

September 11, 2013
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Union clause

In Puzzle with UNION Part 5, the final part, two almost identical queries return the same answer, yet their execution plans are very different. Why?

Read More
SQL SERVER - Simple Puzzle with UNION

SQL SERVER – Simple Puzzle with UNION

September 5, 2013
Pinal Dave
SQL Puzzle
SQL Scripts, SQL Union clause

Try this simple puzzle with UNION and ORDER BY. Guess what each of the three queries returns, and see why one of them fails with Msg 108 and Msg 104.

Read More
A donkey with full panniers and a red blanket walking a mountain path.

Table-Valued Parameters: Sending Thousands of Rows in One Call

August 31, 2013
Pinal Dave
SQL Tips and Tricks
DotNet, SQL Scripts, SQL Server, SQL Stored Procedure

Send thousands of rows in one call with table-valued parameters, compare round trips, and handle missing column statistics accurately.

Read More
A glass display case in a quiet gallery holding three old ceramic jars on a red base.

Read-Only Filegroups: Locking Away Old Data

August 30, 2013
Pinal Dave
SQL Tips and Tricks
Database, SQL Backup and Restore, SQL Data Storage, SQL Scripts

Read-only filegroups let you lock old data so nothing can change it by accident. This post moves old rows to their own filegroup, makes it read-only, shows what still works and what fails, and explains how partial backups skip the locked data.

Read More
Previous 1 … 181 182 183 184 185 186 187 … 363 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com