jeudi 5 janvier 2017

How to write a nested Excel formula to SQL

I have an Excel formula with nested "IF" and want to write it in an SQL.

IF(K2<=50000,"-",IF(F2<=50000,IF(MIN(H2,HI2)<=30%,"Riesgo Medio","-"),IF(F2<100000,IF(MIN(H2,I2)<=30%,"Riesgo Medio",IF(MIN(H2,I2)>=65%,"Riesgo bajo","kyc")),IF(MIN(H2,I2)<=30%,"Riesgo alto",IF(MIN(H2,I2)>=65%,"Riesgo bajo","Riesgo Medio")))))

Aucun commentaire:

Enregistrer un commentaire