I was wondering if it was possible to only substring if the string length is > 2?
Here is my sample statement:
Select SUBSTRING(ABRESC, 1, 2) + '-' + SUBSTRING(ABRESC, 3, 5) AS ABRESC From TABLE
However, some fields are only 2 chars long so i was wondering if its possible to only substring when its longer than 2 chars?
You could use
CASE