Created
July 17, 2020 03:52
-
-
Save jingyang-li/a9727b2a729d7fb4a8ab063dfe6992a7 to your computer and use it in GitHub Desktop.
Remove Items with JSON (T-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
declare @s varchar(max) = 'Hi my name is M and I have two sister 111) M and 2111) K'---, 3333) W'; | |
select string_agg([value],' ') newString | |
from openjson('["'+replace(@s ,' ', '","') + '"]') | |
where [Value] not like '%[0-9])%' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment