range from comma separated values
547752Aug 17 2007 — edited Aug 18 2007I have comma separated values and I would like format the values in terms of range..for example
A1, A2, A3, A6 should return A1-A3, A6
XX1, XX2, XX3, XX4, XX6, XX7, XX8, XX9 should return XX1-XX4, XX6-XX9
Z123, Z124, A125, A126, A127 should return Z123-Z124, A125-A127
etc...
is this possible to do in sql?