SQL command to concatenate several rows into one cell?

Not in standard SQL, but MySQL** provides GROUP_CONCAT which will do exactly what you want.

This is not part of standard SQL, because it's so open-ended, it's a difficult problem to solve in a way that provides a predictable answer. Unlimited numbers of rows are basically normal and expected part of SQL, but unlimited length text strings are not. Group_concat() exists in mysql, but to me it is usually a near-miss for my requirements.

It does the only thing it can, which is to truncate results if it passes over a system limit, group_concat_max_len. Consequently, it still requires extra code to calculate the length of the "real" result and see whether that is longer than group_concat_max_len. Of course, you may have some other constraints that guarantee it won't be a problem, but more likely, it's merely improbable, not impossible to have a problem from exceeding group_concat_max_len.

Additionally, that means you have to verify the value of group_concat_max_len in your code at some point, because it's configurable and could change at some later date.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions