I need help to create a TSQL to return MAX(Value) removing the first part and last part.
i have these Varchar Reference code:
I need to cut the string to find the max number excluding (Part1):
and also excluding (Part3:
in this case converting varchar to INT, the correct value that i want is:
The middle part excluding (Part1 and Part3)
Then my final reference could be: