I am trying to get the next value from this filed SU - 1 /2016
Query I used
SELECT RIGHT('000' + CAST(ISNULL(MAX(SUBSTRING(InvoiceNO,4, 1)), 0) + 1 AS VARCHAR(4)), 4)
from [dbo].[Invoice]
The query output is 0001, it should be 0002.
If I get you correctly, you are using the substring function on SU - 1 /2016. You take a substring from 4th position with a length of 1 (remember substring is 1 based, not 0). So you are getting -. If you try:
SELECT '-' + 1
Gives: 1.
You'll probably need to start 'substringing' at position 6.
You can make your script a bit shorter and use this instead:
SELECT RIGHT(MAX(SUBSTRING(InvoiceNO,6, 1)) + 10001, 4)
-- Including this for test:
FROM (values('SU - 1 /2016')) x(InvoiceNO)