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

  • Home
  • SEARCH
  • 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
  • 2 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

Suppose I have following table in my database: Tbl_Persons: Id Country Name 1 Australia
I have the following table name template, there are a couple with the same
I have the following table template that is rendered through knockout: <table class=gv data-bind=visible:
I have a table in a template, and one of the columns of each
I have a SQL table (Trade Mapping) with the following columns: BTF_TRADE_MAPPING_KEY int BTF_SYSTEM_CODE
I have the following code (also in a jsfiddle ): <table> <thead><tr><th>Equation</th><th>Equation</th></tr></thead> <tbody data-bind=template:
I have a 4 column table of products in template,each item in table has
I have a velocity template which has a nested table. I want to align
I have such code in my JSF template: <h:form> <table id=users cellspacing=0> <a4j:repeat var=person
I have table with 300 000 records (MyISAM). I get record from this table

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.