MySQL Forums
Forum List  »  Newbie

GROUP_CONCAT problem
Posted by: Dmitriy Reznik
Date: September 21, 2010 09:18AM

Dear experts,

I have the following query:
SELECT b.BookStem,
MAX(CASE WHEN r.r_type = 'Audio' THEN r.Awards END) AudioReviews,
MAX(CASE WHEN r.r_type = 'Print' THEN r.Awards END) PrintReviews
FROM BookList b
LEFT OUTER JOIN
(SELECT BookStem, r_type, GROUP_CONCAT(DISTINCT CASE WHEN Award IS NOT NULL THEN
CONCAT('<a href="/manage/review.asp?review=', CAST(ID AS CHAR), '" target="_blank">', Award, '</a>')
ELSE CONCAT('<a href="/manage/review.asp?review=', CAST(ID AS CHAR), '" target="_blank">Review</a>') END SEPARATOR '<br />') Awards
FROM Reviews
GROUP BY BookStem, r_type) r
ON b.BookStem = r.BookStem GROUP BY b.BookStem

Upon execution, I have the following message:
4 line(s) were cut by GROUP_CONCAT()

Could you please explain me what this means and how this can be fixed, if needed?
Thank you very much.

Options: ReplyQuote


Subject
Written By
Posted
GROUP_CONCAT problem
September 21, 2010 09:18AM
September 21, 2010 09:30AM
September 21, 2010 12:16PM
September 21, 2010 04:14PM
September 22, 2010 05:50AM


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.