Last active
July 3, 2024 08:13
-
-
Save azborgonovo/9120590 to your computer and use it in GitHub Desktop.
HtmlDecode in SQL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE FUNCTION [dbo].[udf_HTMLDecode] (@text NVARCHAR(MAX)) | |
RETURNS NVARCHAR(MAX) AS | |
BEGIN | |
DECLARE @vcResult NVARCHAR(MAX) | |
DECLARE @vcCrLf NVARCHAR(2) | |
DECLARE @siPos SMALLINT | |
DECLARE @vcEncoded NVARCHAR(7) | |
DECLARE @siChar SMALLINT | |
SET @vcCrLF = CHAR(13) + CHAR(10) | |
SELECT @vcResult = @text | |
SELECT @siPos = PATINDEX('%&#___;%', @vcResult) | |
WHILE (@siPos > 0) | |
BEGIN | |
SELECT @vcEncoded = SUBSTRING(@vcResult, @siPos, 6) | |
SELECT @siChar = CAST(SUBSTRING(@vcEncoded, 3, 3) AS SMALLINT) | |
SELECT @vcResult = REPLACE(@vcResult, @vcEncoded, NCHAR(@siChar)) | |
SELECT @siPos = PATINDEX('%&#___;%', @vcResult) | |
END | |
SELECT @siPos = PATINDEX('%&#____;%', @vcResult) | |
WHILE (@siPos > 0) | |
BEGIN | |
SELECT @vcEncoded = SUBSTRING(@vcResult, @siPos, 7) | |
SELECT @siChar = CAST(SUBSTRING(@vcEncoded, 3, 4) AS SMALLINT) | |
SELECT @vcResult = REPLACE(@vcResult, @vcEncoded, NCHAR(@siChar)) | |
SELECT @siPos = PATINDEX('%&#____;%', @vcResult) | |
END | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '"', NCHAR(0x0022)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '&', NCHAR(0x0026)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '<', NCHAR(0x003c)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '>', NCHAR(0x003e)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, ' ', NCHAR(0x00a0)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '¡', NCHAR(0x00a1)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '¢', NCHAR(0x00a2)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '£', NCHAR(0x00a3)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '¤', NCHAR(0x00a4)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '¥', NCHAR(0x00a5)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '¦', NCHAR(0x00a6)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '§', NCHAR(0x00a7)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '¨', NCHAR(0x00a8)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '©', NCHAR(0x00a9)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ª', NCHAR(0x00aa)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '«', NCHAR(0x00ab)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '¬', NCHAR(0x00ac)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '­', NCHAR(0x00ad)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '®', NCHAR(0x00ae)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '¯', NCHAR(0x00af)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '°', NCHAR(0x00b0)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '±', NCHAR(0x00b1)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '²', NCHAR(0x00b2)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '³', NCHAR(0x00b3)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '´', NCHAR(0x00b4)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'µ', NCHAR(0x00b5)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '¶', NCHAR(0x00b6)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '·', NCHAR(0x00b7)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '¸', NCHAR(0x00b8)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '¹', NCHAR(0x00b9)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'º', NCHAR(0x00ba)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '»', NCHAR(0x00bb)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '¼', NCHAR(0x00bc)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '½', NCHAR(0x00bd)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '¾', NCHAR(0x00be)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '¿', NCHAR(0x00bf)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'À', NCHAR(0x00c0)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Á', NCHAR(0x00c1)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Â', NCHAR(0x00c2)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Ã', NCHAR(0x00c3)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Ä', NCHAR(0x00c4)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Å', NCHAR(0x00c5)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Æ', NCHAR(0x00c6)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Ç', NCHAR(0x00c7)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'È', NCHAR(0x00c8)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'É', NCHAR(0x00c9)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Ê', NCHAR(0x00ca)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Ë', NCHAR(0x00cb)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Ì', NCHAR(0x00cc)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Í', NCHAR(0x00cd)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Î', NCHAR(0x00ce )) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Ï', NCHAR(0x00cf)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Ð', NCHAR(0x00d0)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Ñ', NCHAR(0x00d1)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Ò', NCHAR(0x00d2)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Ó', NCHAR(0x00d3)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Ô', NCHAR(0x00d4)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Õ', NCHAR(0x00d5)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Ö', NCHAR(0x00d6)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '×', NCHAR(0x00d7)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Ø', NCHAR(0x00d8)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Ù', NCHAR(0x00d9)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Ú', NCHAR(0x00da)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Û', NCHAR(0x00db)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Ü', NCHAR(0x00dc)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Ý', NCHAR(0x00dd)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Þ', NCHAR(0x00de)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ß', NCHAR(0x00df)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'à', NCHAR(0x00e0)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'á', NCHAR(0x00e1)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'â', NCHAR(0x00e2)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ã', NCHAR(0x00e3)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ä', NCHAR(0x00e4)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'å', NCHAR(0x00e5)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'æ', NCHAR(0x00e6)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ç', NCHAR(0x00e7)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'è', NCHAR(0x00e8)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'é', NCHAR(0x00e9)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ê', NCHAR(0x00ea)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ë', NCHAR(0x00eb)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ì', NCHAR(0x00ec)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'í', NCHAR(0x00ed)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'î', NCHAR(0x00ee)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ï', NCHAR(0x00ef)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ð', NCHAR(0x00f0)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ñ', NCHAR(0x00f1)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ò', NCHAR(0x00f2)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ó', NCHAR(0x00f3)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ô', NCHAR(0x00f4)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'õ', NCHAR(0x00f5)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ö', NCHAR(0x00f6)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '÷', NCHAR(0x00f7)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ø', NCHAR(0x00f8)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ù', NCHAR(0x00f9)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ú', NCHAR(0x00fa)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'û', NCHAR(0x00fb)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ü', NCHAR(0x00fc)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ý', NCHAR(0x00fd)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'þ', NCHAR(0x00fe)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ÿ', NCHAR(0x00ff)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Œ', NCHAR(0x0152)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'œ', NCHAR(0x0153)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Š', NCHAR(0x0160)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'š', NCHAR(0x0161)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Ÿ', NCHAR(0x0178)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ƒ', NCHAR(0x0192)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ˆ', NCHAR(0x02c6)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '˜', NCHAR(0x02dc)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Α', NCHAR(0x0391)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Β', NCHAR(0x0392)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Γ', NCHAR(0x0393)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Δ', NCHAR(0x0394)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Ε', NCHAR(0x0395)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Ζ', NCHAR(0x0396)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Η', NCHAR(0x0397)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Θ', NCHAR(0x0398)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Ι', NCHAR(0x0399)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Κ', NCHAR(0x039a)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Λ', NCHAR(0x039b)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Μ', NCHAR(0x039c)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Ν', NCHAR(0x039d)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Ξ', NCHAR(0x039e)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Ο', NCHAR(0x039f)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Π', NCHAR(0x03a0)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '& Rho ;', NCHAR(0x03a1)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Σ', NCHAR(0x03a3)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Τ', NCHAR(0x03a4)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Υ', NCHAR(0x03a5)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Φ', NCHAR(0x03a6)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Χ', NCHAR(0x03a7)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Ψ', NCHAR(0x03a8)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'Ω', NCHAR(0x03a9)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'α', NCHAR(0x03b1)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'β', NCHAR(0x03b2)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'γ', NCHAR(0x03b3)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'δ', NCHAR(0x03b4)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ε', NCHAR(0x03b5)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ζ', NCHAR(0x03b6)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'η', NCHAR(0x03b7)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'θ', NCHAR(0x03b8)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ι', NCHAR(0x03b9)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'κ', NCHAR(0x03ba)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'λ', NCHAR(0x03bb)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'μ', NCHAR(0x03bc)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ν', NCHAR(0x03bd)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ξ', NCHAR(0x03be)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ο', NCHAR(0x03bf)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'π', NCHAR(0x03c0)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ρ', NCHAR(0x03c1)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ς', NCHAR(0x03c2)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'σ', NCHAR(0x03c3)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'τ', NCHAR(0x03c4)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'υ', NCHAR(0x03c5)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'φ', NCHAR(0x03c6)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'χ', NCHAR(0x03c7)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ψ', NCHAR(0x03c8)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ω', NCHAR(0x03c9)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ϑ', NCHAR(0x03d1)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ϒ', NCHAR(0x03d2)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ϖ', NCHAR(0x03d6)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, ' ', NCHAR(0x2002)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, ' ', NCHAR(0x2003)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, ' ', NCHAR(0x2009)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '‌', NCHAR(0x200c)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '‍', NCHAR(0x200d)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '‎', NCHAR(0x200e)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '‏', NCHAR(0x200f)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '–', NCHAR(0x2013)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '—', NCHAR(0x2014)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '‘', NCHAR(0x2018)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '’', NCHAR(0x2019)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '‚', NCHAR(0x201a)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '“', NCHAR(0x201c)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '”', NCHAR(0x201d)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '„', NCHAR(0x201e)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '†', NCHAR(0x2020)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '‡', NCHAR(0x2021)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '•', NCHAR(0x2022)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '…', NCHAR(0x2026)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '‰', NCHAR(0x2030)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '′', NCHAR(0x2032)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '″', NCHAR(0x2033)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '‹', NCHAR(0x2039)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '›', NCHAR(0x203a)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '‾', NCHAR(0x203e)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '⁄', NCHAR(0x2044)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '€', NCHAR(0x20ac)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ℑ', NCHAR(0x2111)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '℘', NCHAR(0x2118)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ℜ', NCHAR(0x211c)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '™', NCHAR(0x2122)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, 'ℵ', NCHAR(0x2135)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '←', NCHAR(0x2190)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '↑', NCHAR(0x2191)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '→', NCHAR(0x2192)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '↓', NCHAR(0x2193)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '↔', NCHAR(0x2194)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '↵', NCHAR(0x21b5)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '⇐', NCHAR(0x21d0)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '⇑', NCHAR(0x21d1)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '⇒', NCHAR(0x21d2)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '⇓', NCHAR(0x21d3)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '⇔', NCHAR(0x21d4)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '∀', NCHAR(0x2200)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '∂', NCHAR(0x2202)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '∃', NCHAR(0x2203)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '∅', NCHAR(0x2205)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '∇', NCHAR(0x2207)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '∈', NCHAR(0x2208)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '∉', NCHAR(0x2209)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '∋', NCHAR(0x220b)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '∏', NCHAR(0x220f)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '∑', NCHAR(0x2211)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '−', NCHAR(0x2212)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '∗', NCHAR(0x2217)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '√', NCHAR(0x221a)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '∝', NCHAR(0x221d)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '∞', NCHAR(0x221e)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '∠', NCHAR(0x2220)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '∧', NCHAR(0x2227)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '∨', NCHAR(0x2228)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '∩', NCHAR(0x2229)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '∪', NCHAR(0x222a)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '∫', NCHAR(0x222b)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '∴', NCHAR(0x2234)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '∼', NCHAR(0x223c)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '≅', NCHAR(0x2245)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '≈', NCHAR(0x2248)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '≠', NCHAR(0x2260)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '≡', NCHAR(0x2261)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '≤', NCHAR(0x2264)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '≥', NCHAR(0x2265)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '⊂', NCHAR(0x2282)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '⊃', NCHAR(0x2283)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '⊄', NCHAR(0x2284)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '⊆', NCHAR(0x2286)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '⊇', NCHAR(0x2287)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '⊕', NCHAR(0x2295)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '⊗', NCHAR(0x2297)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '⊥', NCHAR(0x22a5)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '⋅', NCHAR(0x22c5)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '⌈', NCHAR(0x2308)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '⌉', NCHAR(0x2309)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '⌊', NCHAR(0x230a)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '⌋', NCHAR(0x230b)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '⟨', NCHAR(0x2329)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '⟩', NCHAR(0x232a)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '◊', NCHAR(0x25ca)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '♠', NCHAR(0x2660)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '♣', NCHAR(0x2663)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '♥', NCHAR(0x2665)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '♦', NCHAR(0x2666)) | |
SELECT @vcResult = REPLACE(@vcResult COLLATE Latin1_General_CS_AS, '<p>', @vcCrLf) | |
RETURN @vcResult | |
END | |
GO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment