So I have an order table and comments is a separate table. There could be several lines of comments per order, or there could be none. So my desired output should look like this:
Order_no, Order_date, Comments
So my SQL is straight forward:
However If I have 3 lines of Comments I am of course getting 3 records for that Ord_no. How do I write a subquery that concatenates the comments, rendering only 1 line per order number?
Macola Software Veteran and SAP Business One Consultant on Training Wheels
Check out our Macola tools:
Order_no, Order_date, Comments
So my SQL is straight forward:
Code:
select O.ord_no, O.ord_dt, C.cmt
from oeordhdr_sql O
left join oelincmt_sql C on O.ord_no = C.ord_no
and O.ord_type = C.ord_type
However If I have 3 lines of Comments I am of course getting 3 records for that Ord_no. How do I write a subquery that concatenates the comments, rendering only 1 line per order number?
Macola Software Veteran and SAP Business One Consultant on Training Wheels
Check out our Macola tools: