mysql - use select under case statement -
i want use query allows me 2 differents results on depending on filtre. have tried 1 not work.
case when filtre = 10 ( select sum(s.montant_creance_emp) creances_emp , s.annee annee sc01_emp s ) else ( select sum(s.nombre_creance) creances_emp , s.annee annee sc01_emp s ) end
thanks all.
try
select case when filtre = 10 ( select sum(s.montant_creance_emp) creances_emp , s.annee annee sc01_emp s ) else ( select sum(s.nombre_creance) creances_emp , s.annee annee sc01_emp s ) end <table>
Comments
Post a Comment