Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Code Sql
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Code Sql
Miscellaneous
Thread ID:
00876997
Message ID:
00876997
Views:
46
Hi All,


I have

PRESTATION.DBF
Ifonctionid I && 1 Infirmière A1 - 2 Infirmière A2 - 3 Garde malade etc....( ne > 4 )
nHeures N(8,2)
ddate D

I Would like to know the total of the hours by function for one precise period.
This syntax do'nt Functions
  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 temp3
Thanks in advance for help.
VFP 8 Pack1

bernhart
Next
Reply
Map
View

Click here to load this message in the networking platform