I have a concatenation problem and I was wondering if somebody might be
able to offer some help :-)

I have the following table structure holding product long descriptions:

Part No (pn)    Sequence (seq)  Long Description (long_desc)
--------------- --------------- ----------------------------------------
HL1450          10              This is part of a long description and
HL1450          20              it overlaps onto several lines. I'm 
HL1450          30              having difficulty writing the SQL that
HL1450          40              is needed to make this work...


I need to write SQL that will give me the following output:

Part No         Long Description
--------------- --------------------------------------------------------
HL1450          This is part of a long description and it overlaps onto
                several lines. I'm having difficulty writing the SQL            that 
is needed
to make this work...

(Essentially it a GROUP BY on the part number with an ORDER by on the
sequence field). However, I know how to concatenate multiple columns on
the same row (using the CONCAT or CONCAT_WS functions) but I'm at a loss
over how to concatenate the same column over multiple _rows_

I am aware of the GROUP_CONCAT function, but we are currently running
MySQL 4.0.13 (this functionality is only available on a vers > 4.1)

If any one has a suggestion as how I should go about this one I would
really appreciate it.

Kind regards, Nick

-- 
Nick Heppleston
07989 581766 | [EMAIL PROTECTED]

The Funky PC - http://www.thefunkypc.biz



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to