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
Folded deckchairs taken from a tall stack and opened one by one in a long row along the beach.

Unpivoting Columns Into Rows With CROSS APPLY and VALUES

December 2, 2010
Pinal Dave
SQL Tips and Tricks
PIVOT and UNPIVOT, SQL NULL, SQL Scripts, SQL Server

Use CROSS APPLY and VALUES for unpivoting columns, retain nulls deliberately, preserve labels, and turn paired fields into aligned rows.

Read More
Gouache painting: three clarinet cases on a wooden table, one holding a single clarinet, one with two clarinets crammed in, and a larger case lined in deep red

WITHOUT_ARRAY_WRAPPER: Keep JSON Cardinality Explicit

December 1, 2010
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts

WITHOUT_ARRAY_WRAPPER needs a single-row JSON contract. Compare one object with two unwrapped objects and validate the complete generated text.

Read More
SQL SERVER - Challenge - Puzzle - Why does RIGHT JOIN Exists

SQL SERVER – Challenge – Puzzle – Why does RIGHT JOIN Exists

November 28, 2010
Pinal Dave
SQL Puzzle
SQL Scripts

If LEFT JOIN does the same work, the puzzle is why RIGHT JOIN exists at all. Can you show a case where it is truly required? Share your answer.

Read More
SQL SERVER - Puzzle - Challenge - Error While Converting Money to Decimal

SQL SERVER – Puzzle – Challenge – Error While Converting Money to Decimal

November 27, 2010
Pinal Dave
SQL Puzzle
SQL Error Messages, SQL Scripts

A puzzle for you: why does converting money to decimal throw Msg 8115, an arithmetic overflow error, when you cast 12345.67 as DECIMAL(5,2)? Share your answer.

Read More
SQL SERVER - Concat Function in SQL Server - SQL Concatenation

SQL SERVER – Concat Function in SQL Server – SQL Concatenation

November 25, 2010
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL String

Is there a CONCAT function in SQL Server? An attendee said MySQL and Oracle have one. I show how the plus operator joins strings, numbers and column values.

Read More
Gouache painting: three positions along a tack room wall

geometry STIsEmpty: Empty Shapes Are Different From SQL NULL

November 24, 2010
Pinal Dave
SQL Tips and Tricks
Spatial Database, SQL Function, SQL Scripts, SQL Server

geometry STIsEmpty tests whether an existing spatial instance has an empty point set. I keep that condition separate from SQL NULL. A missing database value and a present empty geometry are different inputs.

Read More
LIKE cardinality illustrated by clear jars containing different stone mixtures beside bowls on a rich apothecary bench.

LIKE Cardinality: String Statistics and Row Estimates

November 22, 2010
Pinal Dave
SQL Performance
SQL Performance, SQL Scripts, SQL Statistics

LIKE row estimates depend on the pattern, string statistics and compilation context. Compare estimated and actual matching rows in a controlled distribution, while keeping cardinality estimates separate from the chosen access path.

Read More
Previous 1 … 244 245 246 247 248 249 250 … 365 Next
  • Books
  • Testimonials
  • Privacy Policy

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