1
I would like to know if it is possible to use the CASE
more than 1 condition.
In this query I have calculations that need to be done when a.operacao == 'C'
but which depend on the value of a.DESCRICAO_PREMIO
('1P'
or '1/5P'
) to define which account exactly.
SELECT
a.*,
CASE (a.operacao)
WHEN 'C' THEN (b.multiplicador * a.valor_jogo)
END AS [Valor]
FROM tb_jogo_detalhe a
INNER JOIN tb_modalidade b ON b.abreviatura = a.operacao
WHERE a.ID = 2222
How to use more than one condition in a CASE
?
I really appreciate your help! thanks!
– Harry