Wednesday, June 3, 2020

SQL - Convert a delimited string to records - STRING_SPLIT

select value from string_split((
SELECT        [TheFilter] FROM            dbo.[MyFilter] AS Config),'|')

will convert A|B|C|D

into

A
B
C
D

If you try to do this in the query designer, it will throw an error, you have to set this using the create or alter view commands

No comments:

Post a Comment