declare @name nvarchar(max)
=
‘test.d.f.g.hf.ddddd’

declare @items table(

id int
identity(1,1)
not
null

, part nvarchar(max)

);

insert
into @items
(part)

select [value]

from
string_split(@name,
‘.’)

where
rtrim([value])
<>
;

select
*
from @items

This will result in:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.