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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:08:58+00:00 2026-06-04T07:08:58+00:00

Please see http://www.sqlfiddle.com/#!3/fb107/3 for an example schema and query I want to run. I

  • 0

Please see http://www.sqlfiddle.com/#!3/fb107/3 for an example schema and query I want to run.
I want to use the STUFF and FOR XML PATH(”) solution to concatenate columns having grouped by another column.

If I use this method to concatenate multiple columnns into a csv list, am I guaranteed that the order will be the same in each concatenated string? So if the table was:

ID  Col1 Col2 Col3
1   1    1    1   
1   2    2    2
1   3    3    3
2   4    4    4
2   5    5    5
2   5    5    5

Am I certain that if Col1 is concatenated such that the result is:

ID Col1Concatenated
1  1,2,3
2  4,5,6

That Col2Concatenated will also be in the same order (“1,2,3”, “4,5,6”) as opposed to (“2,3,1”, “5,6,4”) for example?

This solution will only work for me if the index of each row’s value is the same in each of the concatenated values. i.e. first row is first in each csv list, second row is second in each csv list etc.

  • 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-06-04T07:08:59+00:00Added an answer on June 4, 2026 at 7:08 am

    You can add an ORDER BY clause in the query within your STUFF function

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

Sidebar

Related Questions

Please see http://www.laerdalmail.com/dev/discoversimulation/needs/# for an example of the menu in question: When a topic
Please see this IBM site - http://www.ibm.com/us/en/ If you see the site banners, there
Please see the youtube: http://www.youtube.com/watch?v=FC95ARd96wI notice that the 0:35 , the iPad bottom have
please see code : $result = <b>Associated Names</b>&nbsp;&nbsp;[<a href='http://www.examples.com/authors.html?act=change&id=6141&item=associated'><u>Edit</u></a>]</td> </tr> <tr> <td class='text' align='left'>G&#12539;R<br
please see: http://jsfiddle.net/4Z4fQ/19/ consider the following html: <a id=myElement href=http://www.google.com/> <img id=image src=http://www.google.com/intl/en_com/images/srpr/logo3w.png alt=google/>
Please see the Image here http://www.tiikoni.com/tis/view/?id=41d9394 As shown there are two sliders on the
Please see this website: http://www.rivvir.com/blog/ You can see that the blocks of the columns
Please see this page: http://www.i2mtest.com/advertenties/vergelijken Now, on the top right of the site there's
please see the demo below : http://www.templateaccess.com/demos/walkin/ i bought this template and really really
Please see the attached image: 1) I downloaded a new library here: ( http://www.java2s.com/Code/Jar/ABC/Downloadcommonslang24jar.htm

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.