Skip to content

Instantly share code, notes, and snippets.

@clintmjohnson
Last active August 29, 2015 14:21
Show Gist options
  • Save clintmjohnson/901e2e92fdbe79a44821 to your computer and use it in GitHub Desktop.
Save clintmjohnson/901e2e92fdbe79a44821 to your computer and use it in GitHub Desktop.
This SQL Server Query Extracts Text between two Specific Text Values using CHARINDEX.SUBSTRING
substring( LEFT([Product Details], charindex('Product Name', [Product Details], CHARINDEX('SKU: ', [Product Details]))-3), CHARINDEX('SKU: ', [Product Details]) + len('SKU: '), LEN([Product Details]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment