sugan Posted May 13, 2008 Share Posted May 13, 2008 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 More sharing options...
aspnetguy Posted May 13, 2008 Share Posted May 13, 2008 What DB platform are you using. This will require some programming (TSQL if you are using MSSQL). Link to comment Share on other sites More sharing options...
real_illusions Posted May 13, 2008 Share Posted May 13, 2008 edit - nevermind...i wrote a php answer..but i dont think the original poster is after that... Link to comment Share on other sites More sharing options...
sugan Posted May 14, 2008 Author Share Posted May 14, 2008 Is there any possibility in Mysql select query?Regards,Suganya Link to comment Share on other sites More sharing options...
aspnetguy Posted May 14, 2008 Share Posted May 14, 2008 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.