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
Gouache painting: in a garden bed, a strawberry mother plant and its two small runner plants, still joined by their green runners, sit together in a shallow wooden crate resting on the soil

hierarchyid IsDescendantOf: A Node Includes Itself

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

hierarchyid IsDescendantOf tests membership in a subtree, including its root. These literal paths keep both compared nodes visible and distinguish self from a strict descendant.

Read More
Gouache painting: two sandwiches sit on matching plates and look identical from the front

CONCAT: Missing Inputs Produce Present Text

December 3, 2010
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Server

CONCAT builds display text from available inputs. Preserve missing-source flags when output alone cannot prove completeness.

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
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
A garden kneeler with new side handles beside an old muddy folded sack, a red trowel on its pad

CURRENT_DATE, || and Other Small T-SQL Changes in SQL Server 2025

November 11, 2010
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Server, SQL String

Use CURRENT_DATE, string concatenation, optional SUBSTRING length and bigint DATEADD in SQL Server 2025 with clear examples and checks.

Read More
A row of bean jars on a shelf, one jar with a single extra red bean on top

Leap Years in T-SQL: February 29 and Date Math

November 5, 2010
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts, SQL Server

Handle leap years in T-SQL with date functions, test February boundaries, and choose a clear anniversary rule for February 29 births.

Read More
A small basket of green apples sits before larger baskets filled with apples and pears.

COUNT OVER: Show the Filtered Total Beside Page Rows

November 2, 2010
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Order By, SQL Scripts, SQL Server

COUNT OVER helps me keep a page’s row count separate from the filtered total. Compare full and partial pages. An empty page needs an explicit total-count contract.

Read More
Previous 1 … 46 47 48 49 50 51 52 … 92 Next
  • Books
  • Testimonials
  • Privacy Policy

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