I am needing to use SQL to combine text values from the same column in multiple rows. Sample data:
| record_id | sequence_nbr | text |
|---|---|---|
| 1000 | 1 | text string |
| 1000 | 2 | text string |
| 1000 | 3 | text string |
| 1001 | 1 | text string |
| 1002 | 1 | text string |
| 1002 | 2 | text string |
Records may or may not have more than one text string, so I assume I need a case statement to account for that. Also, the data is in an Informix DB so function syntax will need to be compatible with that.
I haven't been successful with anything I've tried so far. I've seen a few potential options such as lead, lag, and coalesce. Not sure which, if any, of those would be the best option.