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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:57:03+00:00 2026-05-15T11:57:03+00:00

I created an application to send mail to users. I’m using a database where

  • 0

I created an application to send mail to users.
I’m using a database where some users have more than one email address assigned.

Name                        Mail
-----------------------------------------
BusinessXPTO     mail1@xpto.com;mail2@xpto.com

The email column can contain more than one email, separated by a semicolon.
I want to split the string so I can put each email on a different line.

Name                        Mail
-----------------------------------------
BusinessXPTO         mail1@xpto.com
BusinessXPTO         mail2@xpto.com

What is the best solution?

Thanks

  • 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-15T11:57:04+00:00Added an answer on May 15, 2026 at 11:57 am

    Here’s a simple example using the XML features in SQL Server 2005 and above. I’ve taken it verbatim from here but there are lots of examples if you google “split string sql server xml”

    DECLARE @xml as xml,@str as varchar(100),@delimiter as varchar(10)
    SET @str='A,B,C,D,E'
    SET @delimiter =','
    SET @xml = cast(('<X>'+replace(@str,@delimiter ,'</X><X>')+'</X>') as xml)
    SELECT N.value('.', 'varchar(10)') as value FROM @xml.nodes('X') as T(N)
    

    There are other solutions with cursors but this approach as worked well for me.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have created one application which will send and receive mails, so in that
I want to create one application which send email with attachment(select file from SD
I have created an application wherein on click of a button an email with
I have an application in which users can send me feedback. When they do
I have an App that will send authenticated emails using System.Net.Mail and System.Net.NetworkCredential my
I am trying to send mail using actionmailer on a Rails 3.0.1 application. Here
I have a Django-based web application that is required to send a confirmation email
I created a google web application from which I want to send emails. I've
I have created application where i just need to access data form assets folder.
I created an application , which Users can create a Topic and other can

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.