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 6020821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:37:25+00:00 2026-05-23T03:37:25+00:00

I have a table Template with following columns: ID, [Text] Suppose I have two

  • 0

I have a table Template with following columns:

ID, [Text]


Suppose I have two records in a Template table,

1, ‘His full name is ##Full_Name##,he was born on ##Date_of_Birth## in city of ##Place_of_Birth##’

2, ‘I am ##First_Name##, I was born on ##Date_of_Birth##’


I want to find ##Full_Name##, ##Date_of_Birth## and ##Place_of_Birth## in a row.

In the other row there can be two match result which are ##First_Name## and ##Date_of_Birth## .

The output of the two records would be like that:

1, Full_Name, Date_of_Birth, Place_of_Birth

2, First_Name, Date_of_Birth


Can anyone help me?

  • 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-23T03:37:26+00:00Added an answer on May 23, 2026 at 3:37 am

    Here it is:

    DECLARE @Text NVARCHAR(MAX)
    SET @Text ='His full name is ##Full_Name##,he was born on ##Date_of_Birth## in city of ##Place_of_Birth##'
    
    DECLARE @Delimiter VARCHAR(1000)
    SET @Delimiter = '##';
    
    WITH 
        numbers(number)
          AS ( SELECT   ROW_NUMBER() OVER ( ORDER BY o.object_id, o2.object_id ) Number
               FROM     sys.objects o
                        CROSS JOIN sys.objects o2
             ) ,
        counts ( began, number )
          AS ( SELECT   CHARINDEX(@Delimiter, @TExt, 0)
                      , 1
               UNION ALL
               SELECT   CHARINDEX(@Delimiter, @TExt, began + 1)
                      , number + 1
               FROM     counts
               WHERE    CHARINDEX(@Delimiter, @TExt, began + 1) > 0
             ) ,
        subs ( began, ends, number )
          AS ( SELECT   C.began + LEN(@delimiter)
                      , c2.began
                      , c.number
               FROM     counts C
                        INNER JOIN counts C2 ON c2.number = c.number + 1
               WHERE    C.number % 2 = 1
             )
    SELECT  SUBSTRING(@TExt, began, ( ends - began )) Word
    FROM    subs
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some xml in the following format: <fileExport> <rows> <row id=0> <columns> <column
I have the following table* column and class, and yet when the table is
I have following DQL (Doctrine1.2): $dql->select('sum(t.column1) column1, t.column2') ->from('Table t') ->groupBy('t.column2') ->orderBy('column1'); But the
I have the following problem: I have 3 tables: If you want to create
I've got a strange problem connected with content rendering. I use following code to
SMALL VERSION OF THE QUESTION : I need a lib for python or program
Well guys, to ask the question is pretty simple, but myself, I'm having a
I'm getting an error in my Rails 3 app that I can't pinpoint the
I am currently in the process of optimizing a numerical analysis code. Within the
I can insert/update/delete fine from tables like product and such but this code fails

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.