This one really has me scratching my head. It's sort of like a GROUP_CONCAT, but different. I'm pretty sure there is no way to do this with SQL only. I have a query that does a flip-table on a normalized table. The result looks like this:
|_Category_|_FieldA_|_FieldB_|_FieldC_|
|----------|--------|--------|--------|
| CAT1 | A | | |
|----------|--------|--------|--------|
| CAT1 | | B | |
|----------|--------|--------|--------|
| CAT1 | | | C |
|----------|--------|--------|--------|
| CAT1 | D | | |
|----------|--------|--------|--------|
| CAT1 | | | E |
|----------|--------|--------|--------|
| CAT1 | F | | |
|----------|--------|--------|--------|
My challenge is to compress it into as few rows as possible, but only have one value per cell.
|_Category_|_FieldA_|_FieldB_|_FieldC_|
|----------|--------|--------|--------|
| CAT1 | A | B | C |
|----------|--------|--------|--------|
| CAT1 | D | | E |
|----------|--------|--------|--------|
| CAT1 | F | | |
|----------|--------|--------|--------|
Any Ideas?
Thanks in advance.
Mark