Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need to Filter SPT
Message
 
 
À
30/10/2008 20:26:37
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01358528
Message ID:
01358535
Vues:
20
This message has been marked as the solution to the initial question of the thread.
>Here is my SPT
>
>testString = "Select webprddt6.resmngt3.recseq, task, hours2, SUM(ahours) As ah From webprddt6.resmngt2" +;
>" Join webprddt6.resmngt3 On webprddt6.resmngt3.projindex = webprddt6.resmngt2.recseq" +;
>" Join webprddt6.resmngt3b On webprddt6.resmngt3b.taskindex = webprddt6.resmngt3.recseq" +;
>" Where status = 1 And projected = 0 And deptno = '660' Group By webprddt6.resmngt3.recseq, task, hours2"
>
>Would like to show only records where ah is lesthan hours2.

You just need to add having clause at the end of your statement
text to lcText noshow
     Select webprddt6.resmngt3.recseq, task, hours2, SUM(ahours) As ah From webprddt6.resmngt2 ;
   Join webprddt6.resmngt3 On webprddt6.resmngt3.projindex = webprddt6.resmngt2.recseq ;
   Join webprddt6.resmngt3b On webprddt6.resmngt3b.taskindex = webprddt6.resmngt3.recseq ;
   Where status = 1 And projected = 0 And deptno = '660'  ;
   Group By webprddt6.resmngt3.recseq, task, hours2 ;
   having sum(aHours) <2
endtext
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform