Raimundo Neto Posted January 8, 2015 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 Report Posted January 8, 2015 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 Quote
Jair - Fórmula Posted January 20, 2015 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 Report Posted January 20, 2015 Mostra uma exemplo de retorno dos dados, com os cases separados, e junto... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.