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
A puddle on the path, with a red scarf, a carrot and coal saved on the step

Table Variables Survive ROLLBACK: Logging Errors in a Transaction

September 28, 2013
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Server, SQL Transactions, SQL Variable

See how table variables survive rollback to retain error details, then write a permanent error log after a failed SQL Server transaction.

Read More
Two nearly matching tile mosaic panels side by side on a bench, tweezers holding one red tile

Trigram Matching: Finding Similar Words With an N-Gram Table

September 27, 2013
Pinal Dave
SQL Tips and Tricks
SQL Index, SQL Search, SQL Server, SQL String

Build trigram matching with GENERATE_SERIES and an indexed n-gram table, rank shared pieces, and compare spelling similarity with SOUNDEX.

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
A rose branch pressing a red doorbell in the wind with nobody at the door.

UPDATE() in a Trigger Is True Even When Nothing Changed

September 21, 2013
Pinal Dave
SQL Tips and Tricks
SQL Audit, SQL NULL, SQL Server, SQL Trigger

Understand why UPDATE() in a trigger fires for unchanged SET values and log only real changes with inserted and deleted row comparisons.

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
Veneer packets beside one aligned marquetry band and an unused duplicate strip

Set Operator Rules: Column Names, Types and ORDER BY With UNION

September 18, 2013
Pinal Dave
SQL Tips and Tricks
SQL Operator, SQL Server, SQL Union clause

Why did my UNION change its headers, fail on a word, or sort wrong? Small examples show each rule and the error it produces.

Read More
Berry picker gathering several berries beside one berry handled separately

Single-Row Inserts in a Loop: Why Commits Cost So Much

September 17, 2013
Pinal Dave
SQL Tips and Tricks
SQL Server, SQL Transactions, SQL Wait Stats

A loop that inserts one row at a time waits for the log on every row. Here is how to see it, and three ways to wait far less.

Read More
Previous 1 … 257 258 259 260 261 262 263 … 416 Next
  • Books
  • Testimonials
  • Privacy Policy

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