Posts

Showing posts from August, 2022

การต่อนำข้อมูลหลายๆแถวมาต่อกันให้เหลือแถวเดียว

Synnex STRING_AGG ( expression, separator ) [ <order_clause> ] <order_clause> ::=        WITHIN GROUP ( ORDER BY <order_by_expression_list> [ ASC | DESC ] ) Example select receipt_id, STRING_AGG(receipt_item,',') within group (order by receipt_line asc) from table_receipt group by receipt_id