R
Richard
In our financial management system, a user can add multiple remarks for every
purchase request.
So for example, I have a table that looks like
Input:
Purchase_req_no remark_no remark
---------------------------------------------
PRN_100 1 "first remark line for 100"
PRN_100 2 "second remark line for
100"
PRN_100 3 "third remark line for
100"
PRN_200 1 "first remark line for
200"
PRN_200 2 "second remark line for
200"
How do I compose a sql query where the output has all the remark lines
concatenated?
Output:
Purchase_req_no remarks_concatenated
PRN_100 "first remark line" + "second remark line" +
"third ...
PRN_200 "first remark line" + "second remark line"
It would be great if the concatenated output had a single space between each
remark.
For a single purchase_req_no there can be up to 10 remark lines numbered 1
throuth 10, and another ten numbered 900 through 910; it would be good if the
query added only lines less that 900.
purchase request.
So for example, I have a table that looks like
Input:
Purchase_req_no remark_no remark
---------------------------------------------
PRN_100 1 "first remark line for 100"
PRN_100 2 "second remark line for
100"
PRN_100 3 "third remark line for
100"
PRN_200 1 "first remark line for
200"
PRN_200 2 "second remark line for
200"
How do I compose a sql query where the output has all the remark lines
concatenated?
Output:
Purchase_req_no remarks_concatenated
PRN_100 "first remark line" + "second remark line" +
"third ...
PRN_200 "first remark line" + "second remark line"
It would be great if the concatenated output had a single space between each
remark.
For a single purchase_req_no there can be up to 10 remark lines numbered 1
throuth 10, and another ten numbered 900 through 910; it would be good if the
query added only lines less that 900.