Hi Experts
I'm trying to understand the below code specially ElSE part but no luck. If somebody explain it then I really appreciate it. Thanks
WHEN LOAD_DATE = 9999-12-31 THEN NULL
--Convert date to smart surrogate INT of form YYYYMMDD
ELSE CONVERT(INT, (CONVERT(NVARCHAR(8), LOAD_DATE, 112)))
END AS LoadDateID --Alias using friendly name
Regards
Muz


