I need to deliver a result in the following format: [12-14][20][34-35]
Is there any more intelligent or elegant approach than iterating cursor on the select of this column?
The select might be quite large.
Table:
|---------------------|
| col1 |
|---------------------|
| 12 |
|---------------------|
| 13 |
|---------------------|
| 14 |
|---------------------|
| 20 |
|---------------------|
| 34 |
|---------------------|
| 35 |
|---------------------|