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 blank upright books stand behind a flat sage-green book topped by a small brass ring.

XQuery Node Order: Compare Source Document Positions

June 13, 2011
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts

XQuery node order compares positions in an XML document, not their text. Source order, alphabetical order and a node compared with itself give different answers.

Read More
An open wooden case holding a terracotta tile beside blue and pale stones.

geometry STAsBinary: Carry the SRID Beside the WKB

June 12, 2011
Pinal Dave
SQL Tips and Tricks
Spatial Database, SQL Function, SQL Scripts, SQL Server

geometry STAsBinary exports a geometry as WKB, while reconstruction takes a separate spatial reference identifier. I carry that identifier beside the bytes. Supplying a different identifier creates a differently tagged value from the same exported coordinates.

Read More
Gouache painting: a taut linen thread runs around three wooden pegs set in a board, bending at the second peg into an L-shaped path

geometry STPointN: Read a One-Based Point Position

June 7, 2011
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts, SQL Server

geometry STPointN selects a point from an instance. The example keeps its one-based position visible and returns NULL when the requested position exceeds the line point count.

Read More
A cut rose branch with thorns, pruning shears and a clay pot on a greenhouse workbench.

REGEXP_REPLACE Text Cleanup: Replacing Tags Is Not Parsing HTML

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

REGEXP_REPLACE can remove controlled tag-like text, but that is not the same as parsing HTML. Test quoted brackets, surviving script text and word boundaries before deciding whether the replacement fits the input.

Read More
A wooden crate of apples at a market stall beside a small brass hand counter on the counter top.

SQL SERVER – Puzzle – SELECT * vs SELECT COUNT(*)

May 30, 2011
Pinal Dave
SQL Puzzle
SQL Scripts, SQL Server

SELECT * gives an error when run alone, but SELECT COUNT(*) does not. Why? Here is my SELECT * vs SELECT COUNT(*) puzzle from the Bangalore User Group.

Read More
Ceramic vessels, a wooden box, folded cloth, stones and a cord-bound walnut rest on a wooden tray.

OPENJSON Default Schema: Read Its Type Codes

May 29, 2011
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts

OPENJSON default schema exposes key, value and type. Compare all six type codes, retain JSON null, and distinguish scalar text from nested fragments.

Read More
SQL SERVER - Running SSIS Package in Scheduled Job

SQL SERVER – Running SSIS Package in Scheduled Job

May 23, 2011
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL Utility

How to run an SSIS package on a schedule with a SQL Server Agent job, step by step, after my earlier post on running it from the command line.

Read More
Previous 1 … 230 231 232 233 234 235 236 … 365 Next
  • Books
  • Testimonials
  • Privacy Policy

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