I have a 900 line sql and whilst this should be in my mind very simple I cannot get this to workWhat I wantWhenRTC.shift_times is blankThenRTC.time_1 should be made blank in the query (currently it causes me a negative calculation elsewhere inlater processing .i.e i can't use a collision time without a duty start time)triedcase When RTC.shift_times is null then RTC.time_1 else RTC.time_1 end As RTC_Time2
case When RTC.shift_times = '' then replace(RTC.time_1,'%','') else RTC.time_1 end As RTC_Time
case(RTC.shift_times) when null then replace(RTC.time_1,'%','') else RTC.time_1 end as RTC_Time
Mole