I have a temp table that will contain two columns ID
and Text
. The temp table will contain an unknown amount of rows but there will always be an even amount. What I need to do is select every other row starting at 0 (so 0, 2, 4, 6, etc.) and then concatenate the values of Text
together. I found https://stackoverflow.com/questions/4799816/return-row-of-every-nth-record which looks to be how to get every other row but I am not sure how to do the concatenation.
Example Table:
Row ID Text
0 0 This
1 1 Do
2 2 is
3 3 not
4 4 the
5 5 use
6 6 text
7 7 text
The result I would want from that table is This is the text
.