mole999
Well-known Member
- Joined
- Oct 23, 2004
- Messages
- 10,524
- Office Version
- 2019
- 2016
- 2013
- Platform
- Windows
This works
case when (isnumeric(SUBSTRING(DRL.LICENCE_NUMBER,7,2))) = 1 AND SUBSTRING(DRL.LICENCE_NUMBER,7,2) >12 then 'X' else SUBSTRING(DRL.LICENCE_NUMBER,7,2) end,
I want to change 'X' to
SUBSTRING(DRL.LICENCE_NUMBER,7,2) -50,
it throws an error as some of the values retrieved aren't numeric so tried
isnumeric(SUBSTRING(DRL.LICENCE_NUMBER,7,2))) = 1 AND SUBSTRING(convert(varchar(2),DRL.LICENCE_NUMBER),7,2)-50
or
isnumeric(SUBSTRING(DRL.LICENCE_NUMBER,7,2)) = 1 AND SUBSTRING(DRL.LICENCE_NUMBER),7,2)-50
it could BE IF something something, but I'm not seeing it, any thoughts
case when (isnumeric(SUBSTRING(DRL.LICENCE_NUMBER,7,2))) = 1 AND SUBSTRING(DRL.LICENCE_NUMBER,7,2) >12 then 'X' else SUBSTRING(DRL.LICENCE_NUMBER,7,2) end,
I want to change 'X' to
SUBSTRING(DRL.LICENCE_NUMBER,7,2) -50,
it throws an error as some of the values retrieved aren't numeric so tried
isnumeric(SUBSTRING(DRL.LICENCE_NUMBER,7,2))) = 1 AND SUBSTRING(convert(varchar(2),DRL.LICENCE_NUMBER),7,2)-50
or
isnumeric(SUBSTRING(DRL.LICENCE_NUMBER,7,2)) = 1 AND SUBSTRING(DRL.LICENCE_NUMBER),7,2)-50
it could BE IF something something, but I'm not seeing it, any thoughts