Jump to content
Seja Membro VIP - Remova Banners de Propagandas, Tenha Liberado Qualquer Download, Além de Acessos em Áreas Exclusivas!! ×

Recommended Posts


  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  61
  • Content Per Day:  0.01
  • Reputation:   0
  • Achievement Points:  499
  • Solved Content:  0
  • Days Won:  0
  • Status:  Offline

Posted

Pessoal estou querendo dividir dois cases que estão funcionando perfeitamente, fiz o seguinte com os mesmos:

(((CASE
WHEN FLAN.CODTDO = 'RATCS' AND FLAN.PAGREC = '2' THEN (FLANRATCCU.VALOR)
WHEN FLAN.CODTDO = 'RATEMP' AND FLAN.PAGREC = '2' THEN (FLANRATCCU.VALOR)
WHEN FLAN.CODTDO = 'RATFIL' AND FLAN.PAGREC = '2' THEN (FLANRATCCU.VALOR)
WHEN FLAN.CODTDO = 'RATGEN' AND FLAN.PAGREC = '2' THEN (FLANRATCCU.VALOR)
WHEN FLAN.CODTDO = 'RATMAT' AND FLAN.PAGREC = '2' THEN (FLANRATCCU.VALOR)
END
/
((CASE
WHEN FLAN.PAGREC = 2 AND FLAN.CLASSIFICACAO <> '40' AND FLAN.CODTDO <> 'PA' THEN (FLANRATCCU.VALOR)
WHEN FLAN.PAGREC = 2 AND FLAN.CODTDO = 'PA' AND FLAN.VALORORIGINAL <> FLAN.VALORBAIXADO THEN (FLANRATCCU.VALOR)
END)))))*100
AS '%RATEIODEB',
Só que eles só da Zerado, Ja cheguei a colocar isnull e no final ,1, mas ai ele traz apenas o case de cima, alguém pode me ajudar
  • 2 weeks later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic


  • Topic Count:  946
  • Topics Per Day:  0.13
  • Content Count:  9,184
  • Content Per Day:  1.26
  • Reputation:   459
  • Achievement Points:  109,775
  • Solved Content:  0
  • Days Won:  266
  • Status:  Offline
  • Age:  53
  • Device:  Windows

Posted

Mostra uma exemplo de retorno dos dados, com os cases separados, e junto...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.