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 - Group by Rows and Columns using XML PATH - Efficient Concating Trick

SQL SERVER – Group by Rows and Columns using XML PATH – Efficient Concating Trick

April 5, 2013
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL String, SQL XML

A reader wanted students and courses grouped by course and instructor in a single row. Here is a simple concatenation trick with XML PATH that does it.

Read More
Two delivery trolleys stopped nose to nose in a narrow corridor, neither able to pass

What Is a Deadlock in SQL Server?

April 4, 2013
Pinal Dave
SQL Performance
Best Practices, Database, SQL Performance, SQL Server

A deadlock in SQL Server is two sessions each holding what the other needs. I caused one on purpose and read error 1205. Why it is not the same as blocking, who gets killed, and the boring fix that works.

Read More
Gouache painting of two different travel power plugs facing one wall socket, with a small vermilion adapter resting between them.

Cannot Resolve the Collation Conflict (Msg 468): SQL in Sixty Seconds #047

April 3, 2013
Pinal Dave
SQL Video
SQL Collation, SQL Column, SQL Error Messages, SQL in Sixty Seconds

Cannot resolve the collation conflict is Msg 468, and it appears when two text columns use different collations. I reproduced it on SQL Server 2025 with a temp table, found the mismatched columns with a query and tested three fixes, from a COLLATE clause in the query to changing the column itself.

Read More
A red squirrel moving the last acorn from one of two tree hollows into the other, now full

Overlapping Indexes With INCLUDE Columns: Merging Them Safely

April 2, 2013
Pinal Dave
SQL Performance
DBA, SQL DMV, SQL Index, SQL Performance

Find overlapping indexes, compare ordered keys and INCLUDE lists, merge coverage carefully, and review usage before removing either index.

Read More
Identical crumpet rings fill a griddle with their handles pointing in different directions

Plan Cache Duplicates From Whitespace and Case Differences

April 1, 2013
Pinal Dave
SQL Tips and Tricks
Ad Hoc Query, SQL Cache, SQL Server

One extra space or a lowercase keyword gives you a second cached plan. See it in the cache, and learn what actually fixes it.

Read More
A socket wrench sitting slightly loose on a hex bolt, a nearly identical socket from another set lying beside it

Where T-SQL Differs From the ANSI Standard

March 31, 2013
Pinal Dave
SQL Tips and Tricks
Developer, SQL NULL, SQL Paging, SQL Server, SQL String

See where T-SQL differs from the ANSI standard in row limits, concatenation, NULL behavior, and practical query portability.

Read More
A large soap bubble with a smaller one inside, a red bubble wand in a dish.

Temp Table Scope in Nested Procedures and Dynamic SQL

March 30, 2013
Pinal Dave
SQL Tips and Tricks
Dynamic SQL, SQL Stored Procedure, SQL TempDB, Temp Table

Explain temp table scope across nested procedures and dynamic SQL, reproduce missing and duplicate-name errors, and pass rows safely.

Read More
Previous 1 … 491 492 493 494 495 496 497 … 844 Next
  • Books
  • Testimonials
  • Privacy Policy

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