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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:23:42+00:00 2026-06-16T02:23:42+00:00

I have these fields in MySQL: rpt_id, rpt_entrydate, rpt_exitdate, rpt_date and the values of

  • 0

I have these fields in MySQL:

rpt_id, rpt_entrydate, rpt_exitdate, rpt_date

and the values of these fields are as follows:

1, 2012-11-02, 2012-11-03, 2011-11-26
2, 2011-11-23, 2012-11-16, 2011-11-26
3, 2011-11-25, 2012-11-26, 2011-11-26
4, 2011-10-14, 2012-10-17, 2011-10-13
5, 2011-10-05, 2012-10-09, 2011-10-13
6, 2011-10-15, 2012-10-18, 2011-10-13

I want my result to look like this but it doesn’t work:

2011-11-25, 2012-11-26, 2011-11-23, 2012-11-16, 2012-11-02, 2012-11-03, 2011-11-26
2011-10-15, 2012-10-18, 2011-10-05, 2012-10-09, 2011-10-14, 2012-10-17, 2011-10-13
  • 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-16T02:23:43+00:00Added an answer on June 16, 2026 at 2:23 am

    It appears you are attempting to string together all the dates associated with each rpt_date by group. You can do this with a GROUP_CONCAT() and a couple of CONCAT_WS() concatenations.

    The inner CONCAT_WS() combines the pair of rpt_entrydate, rpt_exitdate into a comma-separated string, and the outer CONCAT_WS() pairs the GROUP_CONCAT() string with its rpt_date group.

    SELECT
      CONCAT_WS(', ',
        GROUP_CONCAT(
          CONCAT_WS(', ', rpt_entrydate, rpt_exitdate)
        ),  rpt_date
      ) AS datestring
    FROM yourtable
    GROUP BY rpt_date
    

    http://sqlfiddle.com/#!2/9a07a/5

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

Sidebar

Related Questions

I have a table with three fields id,minvalue and maxvalue.These fields carries multiple values
I have a MySQL table of pages with these fields ( id , parentID
I have 3 tables in mySQL database. questions_table with these fields: question_id (unique ID
For each item I have two fields (these values): name (for example, iPhone) and
I have two inputs Time and Date. I want to convert these fields to
I have these tables (edited out irelevant fields) mysql> desc studentcourseplan; +-------------------+--------------+------+-----+---------+----------------+ | Field
how to post check box values to different fields of mysql db.Ple look at
I have a query $sqlStr4 that selects these fields from a MySQL database: loginid
I have a MySQL table has these fields ID, CID, QUESTION, ANSWER, USER ID
In my table (MySQL) I have these fields: id - primary, auto_increment hash -

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.