SQL Split Row Data Separated by SpacesSQL SERVER 2008 TVF OR CHARINDEX to search column with commaExecution...

Why Prushim were the ones who "separated"?

How to remove extra black line coming in table due to hhline

Cookies - Should the toggles be on?

Could a phylactery of a lich be a mirror or does it have to be a box?

Avoiding morning and evening handshakes

Does SQL Server 2017, including older versions, support 8k disk sector sizes?

How to count the characters of jar files by wc

Explain the objections to these measures against human trafficking

Why do stocks necessarily drop during a recession?

Why is working on the same position for more than 15 years not a red flag?

How to prevent cleaner from hanging my lock screen in Ubuntu 16.04

Why avoid shared user accounts?

Why do no American passenger airlines still operate dedicated cargo flights?

Publishing research using outdated methods

Can I string the D&D Starter Set campaign into another module, keeping the same characters?

Strange Sign on Lab Door

Normalization for two bulk RNA-Seq samples to enable reliable fold-change estimation between genes

Why publish a research paper when a blog post or a lecture slide can have more citation count than a journal paper?

Why are the books in the Game of Thrones citadel library shelved spine inwards?

Roman Numerals equation 1

The weather forecast

Would the Vulcan nerve pinch work on a Borg drone?

Intern applicant asking for compensation equivalent to that of permanent employee

What is 6÷2×(1+2) =?



SQL Split Row Data Separated by Spaces


SQL SERVER 2008 TVF OR CHARINDEX to search column with commaExecution plan flips Filter and Execute Scalar when using the PK, causes cast to failSingle query approach to split and copy string values in a columnSQL Query to compare (HL7) value at certain position in string based on delimiters (not position)How to separate name string by the spaces in the name in T-SQLsplit SQL FULL Backups on ola hallengren maintanance solutionSQL server database backup - Destination Disk - Adding multiple files - does it duplicate or split backup into the files?SQL Server (Azure) split comma-separated string into multiple columns?SQL Split Address Line into Separate Columns













0















I am looking for a query
to find nth value in a list. The separator is anything greater than or equal to 2 spaces. (it can be 3, or 5 spaces).
Trying to avoid scalar value functions, since performance may be slower. The sentences can have any number of words, from 5-20.



create table dbo.TestWrite (TestWriteId int primary key identity(1,1), TextRow varchar(255))
insert into dbo.TestWrite (TextRow)

I am writing SQL Code. -- Row 1: Column 1: I , Column 2: am, Column 3: writing...
SQL keywords include join, except, where. -- Row 2: Column 1: SQL, Column 2: keywords, Column 3: include...


Would like in individual rows with columns, see comments above.



This maybe one solution trying to utilize.
https://stackoverflow.com/questions/19449492/using-t-sql-return-nth-delimited-element-from-a-string



DECLARE @dlmt NVARCHAR(10)=N' ';
DECLARE @pos INT = 2;
SELECT CAST(N'<x>' + REPLACE(@input,@dlmt,N'</x><x>') + N'</x>' AS XML).value('/x[sql:variable("@pos")][1]','nvarchar(max)')









share|improve this question





























    0















    I am looking for a query
    to find nth value in a list. The separator is anything greater than or equal to 2 spaces. (it can be 3, or 5 spaces).
    Trying to avoid scalar value functions, since performance may be slower. The sentences can have any number of words, from 5-20.



    create table dbo.TestWrite (TestWriteId int primary key identity(1,1), TextRow varchar(255))
    insert into dbo.TestWrite (TextRow)

    I am writing SQL Code. -- Row 1: Column 1: I , Column 2: am, Column 3: writing...
    SQL keywords include join, except, where. -- Row 2: Column 1: SQL, Column 2: keywords, Column 3: include...


    Would like in individual rows with columns, see comments above.



    This maybe one solution trying to utilize.
    https://stackoverflow.com/questions/19449492/using-t-sql-return-nth-delimited-element-from-a-string



    DECLARE @dlmt NVARCHAR(10)=N' ';
    DECLARE @pos INT = 2;
    SELECT CAST(N'<x>' + REPLACE(@input,@dlmt,N'</x><x>') + N'</x>' AS XML).value('/x[sql:variable("@pos")][1]','nvarchar(max)')









    share|improve this question



























      0












      0








      0








      I am looking for a query
      to find nth value in a list. The separator is anything greater than or equal to 2 spaces. (it can be 3, or 5 spaces).
      Trying to avoid scalar value functions, since performance may be slower. The sentences can have any number of words, from 5-20.



      create table dbo.TestWrite (TestWriteId int primary key identity(1,1), TextRow varchar(255))
      insert into dbo.TestWrite (TextRow)

      I am writing SQL Code. -- Row 1: Column 1: I , Column 2: am, Column 3: writing...
      SQL keywords include join, except, where. -- Row 2: Column 1: SQL, Column 2: keywords, Column 3: include...


      Would like in individual rows with columns, see comments above.



      This maybe one solution trying to utilize.
      https://stackoverflow.com/questions/19449492/using-t-sql-return-nth-delimited-element-from-a-string



      DECLARE @dlmt NVARCHAR(10)=N' ';
      DECLARE @pos INT = 2;
      SELECT CAST(N'<x>' + REPLACE(@input,@dlmt,N'</x><x>') + N'</x>' AS XML).value('/x[sql:variable("@pos")][1]','nvarchar(max)')









      share|improve this question
















      I am looking for a query
      to find nth value in a list. The separator is anything greater than or equal to 2 spaces. (it can be 3, or 5 spaces).
      Trying to avoid scalar value functions, since performance may be slower. The sentences can have any number of words, from 5-20.



      create table dbo.TestWrite (TestWriteId int primary key identity(1,1), TextRow varchar(255))
      insert into dbo.TestWrite (TextRow)

      I am writing SQL Code. -- Row 1: Column 1: I , Column 2: am, Column 3: writing...
      SQL keywords include join, except, where. -- Row 2: Column 1: SQL, Column 2: keywords, Column 3: include...


      Would like in individual rows with columns, see comments above.



      This maybe one solution trying to utilize.
      https://stackoverflow.com/questions/19449492/using-t-sql-return-nth-delimited-element-from-a-string



      DECLARE @dlmt NVARCHAR(10)=N' ';
      DECLARE @pos INT = 2;
      SELECT CAST(N'<x>' + REPLACE(@input,@dlmt,N'</x><x>') + N'</x>' AS XML).value('/x[sql:variable("@pos")][1]','nvarchar(max)')






      sql-server sql-server-2016 substring split






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 3 mins ago







      Joe Smith 8435

















      asked 42 mins ago









      Joe Smith 8435Joe Smith 8435

      365




      365






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "182"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f231009%2fsql-split-row-data-separated-by-spaces%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Database Administrators Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f231009%2fsql-split-row-data-separated-by-spaces%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Parapolítica Índice Antecedentes El escándalo Proceso judicial Consecuencias Véase...

          How to remove border from elements in the last row?Targeting flex items on the last rowHow to vertically wrap...

          Tecnologías entrañables Índice Antecedentes Desarrollo Tecnologías Entrañables en la...