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: on a tea shop counter a large jar, a medium jar with a small jar in front of it, then a bundle of two cinnamon sticks and a bundle of ten, stand in one row, each branch kept together

hierarchyid Ordering: Paths Follow Depth-First Order

May 9, 2011
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Order By, SQL Server

hierarchyid ordering follows the hierarchy value. Sorting rendered path text can arrange numeric-looking components differently, so keep presentation text separate from traversal order.

Read More
A row of mugs on kitchen hooks, one mug per hook, except one hook holding two mugs together.

ROWS vs RANGE in Window Frames: Why Running Totals Differ

May 4, 2011
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Order By, SQL Scripts, SQL Server

Compare ROWS vs RANGE for running totals, handle tied sort values, write explicit frames, and check worktable reads on your server.

Read More
Gouache painting: in a sports room, two identical pegged racks hold the same four team bibs in cream, blue, sage and red

XML sql:column: Compare XML With a Relational Value

May 3, 2011
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server

XML sql:column passes a typed relational value into XQuery. Keep node existence separate from a missing document and a scalar Boolean.

Read More
Two similar cream ceramic vases stand in separate wooden compartments beside a small sage-green jar.

XQuery Node Identity: Equal Text Can Be Different Nodes

April 27, 2011
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts

XQuery node identity compares source nodes, not their text. Use is beside text equality to distinguish repeated values from the same node.

Read More
Three distinct stamps match three clay impressions beside a separate blank fallback tile.

SQL SERVER – How to Use Decode in SQL Server?

April 23, 2011
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server

CASE expresses the DECODE mapping in this SQL Server example. I keep the named matches and default value explicit.

Read More
Two overlapping pale ceramic tiles beside a terracotta slab and blue and sage stones.

geometry STDistance: Measure the Closest Points of Two Shapes

April 19, 2011
Pinal Dave
SQL Tips and Tricks
Spatial Database, SQL Function, SQL Scripts, SQL Server

geometry STDistance measures the shortest distance between points belonging to two represented shapes. I compare an interior gap with an endpoint gap. Intersecting shapes provide a useful zero-distance case.

Read More
Gouache painting: from a wooden beam hang two brass bells with a wide gap between them

hierarchyid GetDescendant: Insert Between Siblings

March 30, 2011
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts, SQL Server

hierarchyid GetDescendant can generate a sibling location before, after or between existing bounds. This read-only example computes paths without inserting records or guaranteeing allocation.

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

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