I have to disect thousands upon thousands of strings like this:


I've been able to pull out the first, second and final segments as separated by hyphens, but now I have a predicament where I need to use the second segment, the 2 shown in the example above, in a join to another table. Problem is Cache apparently doesn't like doing that. Just the same, I have to find a way.

Here's the code I'm using to pull that segment out into as separate field in the query results:

0 2
0 889