I am looking for a question
to find an nth value in a list. The separator is anything greater than or equal to 2 spaces. (this can be 3 or 5 spaces).
Try to avoid scalar value functions because performance may be slower. The sentences can have any number of words, from 5 to 20.
create dbo.TestWrite table (TestWriteId int primary key identity (1,1), TextRow varchar (255)) insert into dbo.TestWrite (TextRow) I write SQL code. - Line 1: Column 1: I, Column 2: am, Column 3: Writing ... SQL keywords include join, except, where. - Line 2: Column 1: SQL, Column 2: Keywords, Column 3: Include ...
Would like in individual lines with columns, see comments above.
This may be a solution trying to use.
DECLARE @dlmt NVARCHAR (10) = ## ;; DECLARE @pos INT = 2; CHOOSE CAST (N / # 39;
& # 39; + REPLACE (@ input, @ dlmt, N & # 39; & # 39;) + N & # 39;AS XML) .value (& # 39; / x[sql:variable("@pos")]& # 39; & # 39; nvarchar (max)