This is a sample, and my aim is to fetch columns as mentioned below :
(comments are locked)
|
|
It would be possible to use a tally table to split your string into a table and then re-order it so that it could be recompiled into a sorted string and then, from your question, I gather you want this to be used in a piece of dynamic TSQL. I am not sure this is the best way of handling what you want. Can you offer a bit of information about the rest of your project so that we can advise you better? Using TSQL to do complex string manipulation is never an efficient solution.
(comments are locked)
|

