SELECT IIF( Ifonctionid = 1 , SUM( nheures ) , .T. ) AS "Infirmères",; IIF( Ifonctionid = 2 , SUM( nheures ) , .T. ) AS "Garde",; IIF( Ifonctionid = 3 , SUM( nheures ) , .T. ) AS "Para"; FROM amline!prestation; WHERE date BETW D_debut AND D_Fin GROUP By ifonctionId INTO CURSOR Temp3 SELECT temp3Thanks in advance for help.