Skip to content

Instantly share code, notes, and snippets.

@mikaelnet
Created November 26, 2019 15:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikaelnet/e38b725ac85ab425b0721d797a9d85f3 to your computer and use it in GitHub Desktop.
Save mikaelnet/e38b725ac85ab425b0721d797a9d85f3 to your computer and use it in GitHub Desktop.
Finds invalid characters in any Sitecore field
SELECT * FROM (
SELECT ItemId, FieldId, Value FROM [SharedFields] (nolock)
UNION
SELECT ItemId, FieldId, Value FROM [UnversionedFields] (nolock)
UNION
SELECT ItemId, FieldId, Value FROM [VersionedFields] (nolock)
) A
WHERE Value Like '%' + CHAR(0x01) + '%'
OR Value Like '%' + CHAR(0x08) + '%'
OR Value Like '%' + CHAR(0x10) + '%'
OR Value Like '%' + CHAR(0x12) + '%'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment