SQL Server T‑SQL Documentation – Errata

DATEADD/ DATEDIFF precision issueSQL Server 2019

Issue: When using DATEADD with datetime2, precision beyond 3 fractional seconds is truncated.

Resolution: Use datetime2(7) explicitly or switch to datetimeoffset.

Read more →

MERGE statement bug in parallel executionSQL Server 2017

Issue: MERGE may produce duplicate rows when executed with a parallel plan.

Resolution: Add OPTION (MAXDOP 1) or rewrite using INSERT/UPDATE/DELETE.

Read more →

JSON parsing error with escaped charactersSQL Server 2022

Issue: OPENJSON fails when JSON strings contain escaped forward slashes.

Resolution: Use WITH (path varchar(200) '$.value') and apply REPLACE.

Read more →

Full‑Text Search stoplist removal ignoredSQL Server 2016

Issue: Dropping a stoplist doesn't affect existing full‑text indexes.

Resolution: Re‑create the full‑text index after stoplist removal.

Read more →

Potential injection via sp_executesql with dynamic SQLSQL Server 2012

Issue: Unparameterized concatenation bypasses escaping.

Resolution: Always use parameter placeholders and pass values separately.

Read more →