;WITH cte AS
(
SELECT 0 AS CharCode
UNION ALL
SELECT CharCode + 1 FROM cte WHERE CharCode <31
)
SELECT * FROM
Your_Table_Name T
cross join cte
WHERE
EXISTS (SELECT Unique_ID_Column,Your_Column
FROM Your_Table_Name Tx
WHERE Tx.Unique_ID_Column = T.Unique_ID_Column
AND Tx.Your_Column LIKE '%' + CHAR(cte.CharCode) + '%'
and cte.CharCode>0
)
No comments:
Post a Comment