sql - CASE with Join | Query Optimization -
i need optmizing query,
it's running on preview mode when import report, report gets failing
select su4.user_value codice_skoff, case when (su1r.user_id = 'a' , su4.user_value = '9') 'testa' when (su1r.user_id = 'b' , su4.user_value = '10') 'testb' when (su1r.user_id = 'c' , su4.user_value = '11') 'testc' when (su1r.user_id = 'd' , su4.user_value = '12') 'testd' else 'none' end
i think it's because of case
, turns report slow , gets failing message
after from
have several left outer join
thanks in advance
Comments
Post a Comment