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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:10:29+00:00 2026-06-18T03:10:29+00:00

i want to create a query from multiple records as one record , but

  • 0

i want to create a query from multiple records as one record , but i don’t want to use Pivot, FYI , i have > 260 Records , it is impossible if i Write Manual PIVOT,
is there any Simple solutions?

here’s the table Example :

ID   Element_Name  Value
1    Parmitha      100
2    Anggun        200
3    Chandra       300
4    BagusofTerror 400
5    Laras         500
6    Jessica       600
7    Aisyah        700
......
200 Sonya          20000

and i want the result is like this :

paramitha , anggun, chandra , bagusofterror, Laras , Jessica , Aisyah, ..... , Sonya
100 , 200, 300, 400,500,600,700,....,20000
  • 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-18T03:10:31+00:00Added an answer on June 18, 2026 at 3:10 am

    In reference to http://blog.sqlauthority.com/2009/12/21/sql-server-comma-separated-values-csv-from-table-column-part-2/ you could use the following SQL query

    I havent run this, so I’m not 100% sure it’ll work

    SELECT STUFF(
    (SELECT ',' + s.ElementName
    FROM tableName s
    FOR XML PATH('')),1,1,'') 
    
    UNION ALL
    
    SELECT STUFF(
    (SELECT ',' + s.Value
    FROM tableName s
    FOR XML PATH('')),1,1,'') 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want create multiple search where statement $where_search is a multiple condition from post
I have a somewhat complex query with multiple (nested) sub-queries, which I want to
I'm trying to create a SQL 2005 query to retrieve and combine records from
I want to create a MyQSL Query similar to SELECT person, city FROM mytable
I would like to query multiple tables from SQL Server 2005 and create a
I would want to create an array that will hold records retrieved from a
I want to create a query that selects the columns PlayerName , PlayerNumber, Location,
I want to create a query in TFS that allows me to view only
Can anyonen help with Teradata? I want to create a query that is a
I want to create an SQL query that selects the pictures of females in

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.