Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5839631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T11:36:41+00:00 2026-05-22T11:36:41+00:00

I need to take this to the next level… How can I keep this

  • 0

I need to take this to the next level… How can I keep this from splitting on words. I want it to only split on spaces?

here is a sample of the string I’m trying to break into multiple rows.

SARASOTA MANATEE AIRPORT BEING THAT
PORTION OF LANDS LYING OUTSIDE OF
SARASOTA CITY LIMITS DESC IN ORI
2000036853, ENTIRE PARCEL BEING DESC
AS LYING IN SARASOTA COUNTY, CITY OF
SARASOTA & PORTION OF FORMER OLD
BRADENTON RD LYING NLY OF UNIVERSITY
PKWY & GEN SPAATZ BLVD, LESS LANDS
LYING ELY OF W R/W LINE OF SEABOARD
COAST LINE RR, LESS TRACT LEASED TO
SMITH AT NE COR OF US HWY 41 & LESS
PARKING AREA LEASED TO UNIV OF SO FLA
ON N SIDE OF GEN SPAATZ BLVD, LESS
LEASED PARCELS FOR HERTZ, AVIS,
NATIONAL, BUDGET, DOLLAR & ALAMO CAR
RENTALS, LESS TRACT MEASURING 100 FT
BY 110 FT LEASED TO AIRCRAFT SVCS INTR
INC, LESS RD R/W FOR UNIVERSITY PKWY &
US 301, CONTAINING 145 C-AC M/L, L & B
IN SEC 1-36-17 & SEC 6-36-18

I don’t want to get

  • SARASOTA MANATEE AIRPORT BEING THAT PORTION OF LAN
  • DS LYING OUTSIDE OF SARASOTA CITY LIMITS DESC IN O
  • etc….

Here is my sql

>     SELECT REPLACE(dl.ParcelID, '-', '') As strap,
>     x.number AS num, 
>     SUBSTRING(LTRIM(RTRIM(dl.legaldescription)),((number-1)*50)+1,50)
> AS dscr
>     FROM
>     (SELECT dld.accountnumber, dp.parcelid, dld.legaldescription 
>       FROM t1..DataLegalDescription dld
>       JOIN t1..DataProperty dp ON dp.accountnumber = dld.accountnumber
> AND dp.cardnumber = 1
>       JOIN t1..ManatronRealSamples mrs ON mrs.parcelid = dp.parcelid) AS dl
>     CROSS APPLY (SELECT number FROM MASTER.dbo.spt_values
>     WHERE TYPE = 'p' AND number > 0
>     AND number <= (DATALENGTH(legaldescription)/50+1)) x
>     ORDER BY x.number
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T11:36:42+00:00Added an answer on May 22, 2026 at 11:36 am
    ALTER FUNCTION SPLIT(@VALUE NVARCHAR(MAX),@LEN INT)
    RETURNS @TEMP TABLE (ORIG_STRING NVARCHAR(MAX),PARTIAL_STRING NVARCHAR(MAX),LINE_NUM INT)
    as
    BEGIN
    DECLARE @TEMP_STRING NVARCHAR(MAX)
    DECLARE @TEMP_FULL NVARCHAR(MAX)
    DECLARE @LINE_NUM INT
    
    SET @TEMP_FULL = @VALUE
    SET @TEMP_STRING = dbo.RegexStrMatch(@TEMP_FULL,'^(.{0,'+ CAST(@LEN AS NVARCHAR(MAX)) +'}(?:\s))',1)
    SET @LINE_NUM = 1
    
    WHILE LEN(@TEMP_FULL) >= @LEN
         BEGIN  
            INSERT INTO @TEMP VALUES(@VALUE,@TEMP_STRING,@LINE_NUM)     
            SET @TEMP_FULL = SUBSTRING(@TEMP_FULL,LEN(@TEMP_STRING)+1,LEN(@TEMP_FULL))      
            SET @LINE_NUM = @LINE_NUM + 1
            SET @TEMP_STRING = dbo.RegexStrMatch(@TEMP_FULL,'^(.{0,'+ CAST(@LEN AS NVARCHAR(MAX)) +'}(?:\s))',1)            
         END
            INSERT INTO @TEMP VALUES(@VALUE,@TEMP_STRING,@LINE_NUM)
    RETURN 
    END
    GO
    

    Followed by a simple CROSS APPLY

    select accountNumber,Partial_String,Line_num from ..datalegaldescription dl
    CROSS APPLY SPLIT(dl.legaldescription,50)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need some help adding conditions to a linq query. Take this small example
I'm baffled how to do this. I need to take a datetime object and
This is my first post here. I have a problem. I need to take
It would take too long to explain why I need this, but I was
I need to take a web page and extract the address information from the
I need to take a paragraph of text and extract from it a list
I need to take a csv file and import this data into a multi-dimensional
I need to take data from one table and import it into another table.
This question is kind of the next level of F# Set using custom class
I need to take random row from table. At first, i wrote SP like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.