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.02
  • 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:  926
  • Topics Per Day:  0.13
  • Content Count:  9,097
  • Content Per Day:  1.31
  • Reputation:   376
  • Achievement Points:  109,102
  • Solved Content:  0
  • Days Won:  232
  • Status:  Offline
  • Age:  53
  • Device:  Windows

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

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