Hi,
these days i'm trying to build a group-by-SQL-Query to aggregate a string
This is an example of dataset i have
Dept Name Jenis Qty
=======================
A 1 X 2
A 2 Y 3
B 1 X 1
C 3 X 2
C 1 X 1
now, is there a group-by-SQL-Query to aggregate that dataset into below data model?
Dept Name Jenis Total Qty
=========================
A 1;2 X+Y 5
B 1 X 1
C 3;1 X+X 3
Creating aggregate on Qty is as simple as statement SUM(), but aggregate-a-string-field is not a simple answer. Is that true that I should use cursor to create that?
these days i'm trying to build a group-by-SQL-Query to aggregate a string
This is an example of dataset i have
Dept Name Jenis Qty
=======================
A 1 X 2
A 2 Y 3
B 1 X 1
C 3 X 2
C 1 X 1
now, is there a group-by-SQL-Query to aggregate that dataset into below data model?
Dept Name Jenis Total Qty
=========================
A 1;2 X+Y 5
B 1 X 1
C 3;1 X+X 3
Creating aggregate on Qty is as simple as statement SUM(), but aggregate-a-string-field is not a simple answer. Is that true that I should use cursor to create that?