Jump to content

Querying database and resulting with group by


watsmyname

Recommended Posts

Hello all,

 

i dont know whether this type of issue has already been addressed or not, i would have searched but dont know the exact keyword to search. So i m posting it again.. my issue goes likes this. I have four (or even more) rows like this in my database table

 

item_id      date_payment        item_type        item_name

1234          2009-08-21              copy                Copy name 1

1234          2009-12-23              copy                Copy name 1

1234          2010-02-12              copy                Copy name 1

1234          2010-04-21              copy                Copy name 1

 

above 4 rows are identical except we have different date of payment. I want help on query that displays a row grouped to show single row with all the dates  in comma separated form. For example i want to show result like this

 

item_id                                    date_payment                                    item_type        item_name

1234            2009-08-21 , 2009-12-23, 2010-02-12, 2010-04-21            copy                Copy name 1

 

Can anybody help me please!

 

Thanks a ton!

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.