I'm querying a table that has several alphanumeric key columns…
KEY1 KEY2 KEY3 ... SOMEDATA SOMEOTHERDATA...
s001
s002
s003 s004 s005
s006
The keys are the PK from another table we need to join on, which is annoying but not difficult. But then they decided to do this…
s010-s105
Which means s010, s011…s015. Is there any way to do a query that breaks this out so I can find a given key, say s013, in these columns?
Best Answer
T-SQL - 246 Bytes
Quick and dirty:
With the caveat that parsename wont dig beyond 4 levels