Tuesday, January 31, 2017

mysql query join rows into one

GROUP_CONCAT is nice function :)

example:
Select Group_Concat(Concat(Date_Format(x.mstDDate, '%d/%m/%Y'), '-', x.mstDSparepart,'-',x.mstDAttribute) Separator ';') From inv_masterdetail x Where x.mstID = a.mstID

No comments:

Post a Comment