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
Two wooden trays hold terracotta pots with plants of different sizes beside a bright stone-room window.

VAR and VARP: Choose the Variance Denominator

March 28, 2011
Pinal Dave
SQL Tips and Tricks
Mathematical Function, SQL Function, SQL Server

VAR and VARP describe sample and population variation. Keep observation count and missingness visible when reporting their results.

Read More
Gouache painting: on a garden path a smooth bent willow hoop arches over the ground

STCurveToLine: Convert Curves to Linear Approximations

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

STCurveToLine approximates circular curves with linear geometry. Compare curve, polygon, point, empty and NULL results by their type and state.

Read More
Gouache painting: a triangular sheet of flatbread dough lies on a floured board with one hazelnut at each of its three corners

geometry STNumPoints: Closing Coordinates Count Again

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

geometry STNumPoints counts coordinates in the spatial description. A square ring contains its closing coordinate as well as its four distinct corners.

Read More
Gouache painting: on a music room shelf, one tambourine hangs beside a stacked trio of tambourines

geometry STGeometryType: Type Names Say More Than Dimension

March 7, 2011
Pinal Dave
SQL Tips and Tricks
Spatial Database, SQL Function, SQL Scripts, SQL Server

geometry STGeometryType identifies the represented shape type, which carries more information than its dimension. I compare single and multiple shapes in one small query. Equal dimensions do not mean that their structures are interchangeable.

Read More
Gouache painting: a wooden staircase with a red banister climbing to a landing in a quiet hall

hierarchyid GetAncestor: Stop at the Root

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

hierarchyid GetAncestor returns a logical ancestor path. Its zero-distance result is the original node, while a request beyond the root returns NULL.

Read More
Three ivory bowls hold blue pebbles or remain empty, beside a walnut piece and red cord.

TRY_CAST: Parse Failure and Prohibited Conversion

January 18, 2011
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Server

TRY_CAST helps classify bounded integer text while preserving missing input separately. A prohibited int-to-xml request still needs error handling. A narrow text target can succeed while discarding characters.

Read More
Gouache painting: a battered tin box with its lid propped open stands on a bench

geometry Collections: Read Members With STGeometryN

December 22, 2010
Pinal Dave
SQL Tips and Tricks
Spatial Database, SQL Function, SQL Scripts, SQL Server

geometry Collections hold member shapes that STGeometryN can return individually. I extract a point and a line from one fixed collection. A third request deliberately exceeds its member count.

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

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