Jump to content

Select Query


sugan

Recommended Posts

Hi,I have a table as:

United States  2008-01-01  jackUnited States  2008-01-05  johnUnited States  2008-01-07  martUnited States  2008-01-07  cannaUnited States  2008-01-08  suzzUnited States  2008-01-08  anne

i just want to write a select query, for which if it contains same date, then, the name should be combined as

United States  2008-01-01  jackUnited States  2008-01-05  johnUnited States  2008-01-07  mart,  cannaUnited States  2008-01-08  suzz, anne

How to write query for the above display format.Regards,Sugan

Link to comment
Share on other sites

You will need to create a stored procedure and will have to create a temporary table. You will need to loop through (use a cursor) the original table and update the temp table.I could give you a sample in MSSQL's TSQL but I highly doubt it is the same in MYSQL (if it can be done at all).You may need to resort to a programming solution (PHP if that is what you are using).

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...