Hello, everyone. I have a query I don't even know how to begin with. I suppose I could write a cursor to do it, but why do that if there is a query that will suffice.
I have a data set similar to this.
PK, FK, Text
1 1 This is some text
2 1 that spans more
3 1 than one row.
4 2 This text does
5 2 as well.
What I would like to do is roll up the text on the foreign key so I could get a result set like
FK Text
1 This is some text that spans more than one row.
2 This text does as well.
Again, writing the text out to a temp table with a cursor making a new row on foreign key will work, but I'm not tickled by the notion.
Suggestions or strokes of genius?
Thanks, All.
Patrick B
I have a data set similar to this.
PK, FK, Text
1 1 This is some text
2 1 that spans more
3 1 than one row.
4 2 This text does
5 2 as well.
What I would like to do is roll up the text on the foreign key so I could get a result set like
FK Text
1 This is some text that spans more than one row.
2 This text does as well.
Again, writing the text out to a temp table with a cursor making a new row on foreign key will work, but I'm not tickled by the notion.
Suggestions or strokes of genius?
Thanks, All.
Patrick B