I have a table with an ID column that can contain duplicates, as it's used as a foreign key to match against my main table. There can be multiple results per id, as per the example below:
ID FieldValue
1 This
2 Also this
1 and that
3 And additionally, this.
2 and, finally, this.
How would I go about merging the FieldValue column so that there was only one row per ID? E.g.
ID FieldValue
1 This;and that
2 Also this;and, finally, this.
3 And additionally, this.
I wouldn't be concerned if the duplicate rows had to remain, e.g.
ID FieldValue
1 This;and that
2 Also this;and, finally, this.
1 This;and that
3 And additionally, this.
2 Also this;and, finally, this.
As I could just run a DISTINCT query on them now that they're truly duplicates. Have been Googling for a while to no results; I suspect because it's something that has a few steps to it and I need to know what those steps are before a search would be fruitful.
Any ideas?