MySQL Forums
Forum List  »  Newbie

Re: What's wrong with this? (Left Join)
Posted by: Chris Stubben
Date: March 25, 2005 02:15PM

Actually, if you have 4.1, the GROUP_CONCAT function would be better than max... that way if you do have multiple values for a given upload and name combination, they will be all be included in a single column separated list.

select upload,
GROUP_CONCAT( if (name='Address', value, NULL) ) as Address,
GROUP_CONCAT( if (name='City', value, NULL) ) as City,
GROUP_CONCAT( if (name='State', value, NULL) ) as State,
....

FROM ezu_uploadinfos
GROUP by 1;

Options: ReplyQuote


Subject
Written By
Posted
Re: What's wrong with this? (Left Join)
March 25, 2005 02:15PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.