Need help... the following query gives an error when trying to use IF Else. The SERIAL_NUMBER field has the two digit year in it and I want to extract it and display it as a 4 digit year in it's own field.
SELECT
[START_TIMESTAMP]
,[END_TIMESTAMP]
,[SERIAL_NUMBER]
,[MODEL]
,[TESTING_ACTION_RESULT]
,[FAILED_STEP]
,[DISPOSITION]
,[TesterId]
,[Location]
,[Customer]
,IF CAST(substring([SERIAL_NUMBER],3,2)AS INT)>90
'19'+substring([SERIAL_NUMBER],3,2) AS MFG_YYYY
ELSE
'20'+substring([SERIAL_NUMBER],3,2) AS MFG_YYYY
FROM [DATABASE_1].[dbo].[TBL_Unit_Test]
GO