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 market stall board a short branch of tomato vine has just been cut by a small knife, keeping its green stem, two leaves and a cluster of ripe red tomatoes still attached

XML query: Keep the Selected Markup Intact

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

XML query retains selected markup and attributes. Distinguish an empty fragment from a missing document, and review the display type.

Read More
Gouache painting: four pairs of cherries hang joined at the stem on a wooden rail

SUBSTRING Binary: Count Bytes Rather Than Characters

June 30, 2010
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Server

SUBSTRING binary offsets use byte units. Keep text slicing separate from encoded payload slicing and retain empty and missing cases.

Read More
Gouache painting: beside a river, a thin reed clump and a dense tall one both lean left with the current

SIGN: Classify Positive, Negative and Zero Values

June 26, 2010
Pinal Dave
SQL Tips and Tricks
Mathematical Function, SQL Function, SQL Server

SIGN describes which side of zero an amount occupies. Preserve the original quantity and distinguish a zero value from missing input.

Read More
Two shallow wooden trays on pale surfaces, connected by a blue cord, with a terracotta cord passing through the right tray.

geometry STIsValid: Parsed Shapes Still Need a Validity Check

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

geometry STIsValid checks whether a spatial instance satisfies the validity rules for its geometry type. I use two parsed lines to separate those questions. Successful construction alone does not establish that a shape is valid.

Read More
Gouache painting: two square slabs of pale clay overlap at one corner on a potter's table

geometry STUnion: Merge the Shared Area Only Once

May 31, 2010
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts, SQL Server

geometry STUnion merges geometry coverage. These exact-coordinate rectangles distinguish a combined area from the sum of two areas, including duplicate coverage.

Read More
Two clusters of blue and pale beads on a linen strip separated by terracotta cord knots.

REGEXP_INSTR: Locate a Match or a Capture Group

May 30, 2010
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server

REGEXP_INSTR returns the position of a selected regular-expression match or capture group. I compare its positional arguments using one short string. This example needs SQL Server 2025 and database compatibility level 170.

Read More
Gouache painting: on a farm table stand a short crate and a tall crate

ISNULL Versus COALESCE: Return Length Can Change

May 22, 2010
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Server

ISNULL versus COALESCE can preserve different string widths. Make the intended replacement type explicit before characters are truncated.

Read More
Previous 1 … 49 50 51 52 53 54 55 … 92 Next
  • Books
  • Testimonials
  • Privacy Policy

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