In table Requets, have RequestNo, DTTDay, DMRDay, CombineDay, etc
I want to select the details when :
if CombineDay <> 0
will select the data when CombineDay < 24
else
will select the data when (DTTDay < 24 or DMRDay < 24)
Have tried
select * from Request
where Case when CombineDay <> 0 then
CombineDay < 24
else
DTTDay < 24 or DMRDay < 24
But its like something wrong with the query. Appreciate any help. Thanks
ps : have no idea what to put on Title
Edit: Sample Table
RequestNo BookingNo DTTDay DMRDay CombineDay
SR-xx Pxx 0 0 14
SR-xx Pxx 8 0 0
SR-xx Pxx 0 0 28
Edit:
i think my explanation is not very clear. Ok, the sample data above the the original data. From that table, i want to select details where firstly it check if CombineDay <> 0, it will select the detail when CombineDay < 24
. And else, it will select the details when (DTTDay < 24 or DMRDay < 24)