Thanks for the reply. I will refrain from pasting picture of code.
A little background - MO = Manufacturing Order. Dataset has one record for every Manufacturing Order. Objective is to give end user ability to filter and get all Manufacturing Order Records pertain to a single Sales Order (Always starts with ORD and always part of the string MO Description).
The final code that works perfectly (at least so far)
CASE WHEN A.DSCRIPTN like 'From%' then SUBSTRING(A.DSCRIPTN, 9, 11)
WHEN A.DSCRIPTN like 'ORD%' then SUBSTRING(A.DSCRIPTN, 1, 11)
WHEN A.DSCRIPTN like 'PO%' then SUBSTRING(A.DSCRIPTN, CHARINDEX('ORD', A.DSCRIPTN),11)
else 'STOCK' end as Demand,
I took out the -3 and changed the 14 to an 11. I thought -3 was needed to go back from 'ORD' (which is 3 characters) didn't realize it was going back from the start of ORD and thus, giving me blank spaces left of the ORD value. Fortunately the ORD value is always 11 characters long - which means once you find the ORD - you get the proper value.....
Thanks again - it's great I can use SUBSTRING again if I have to.