Raimundo Neto Posted January 8, 2015 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 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
Jair - Fórmula Posted January 20, 2015 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 Report Posted January 20, 2015 Mostra uma exemplo de retorno dos dados, com os cases separados, e junto...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now