ItIsHardToProgram
Technical User
I have the present SQL statement:
SELECT DISTINCT ProjetBaseDon.*, Contacts.*, ProjetBaseDon.[Valeur des honoraires]-((jourFtemps.TotalH)*(Emp.[taux horraire])) AS [Valeur des honnoraires], JourFtemps.TotalH AS honnoraire, JourFtemps.No_Ftemps
FROM Emp, Ftemps, (Contacts INNER JOIN (ProjetBaseDon INNER JOIN Projet_a_contact ON ProjetBaseDon.[# Projet]=Projet_a_contact.no_projet) ON Contacts.no_contact=Projet_a_contact.no_client) INNER JOIN JourFtemps ON Projet_a_contact.no_projet=JourFtemps.No_projet2
WHERE (((JourFtemps.TotalH)>0) And ((Ftemps.Numéro_Feuille_Temps)=jourftemps.no_ftemps));
Presently it not only shows the Project budget that is substracted, but also the total, and all the records everytime a new employee enters a new project in his timesheet.....
So what I want it to do is to take the hours an employee spent on a project (jourftemps.totalH) and multiplicate it by the salary/hour of the employee Emp.[taux horraire] then take that number and substract it to the total budget, so that when the administrator run the query, they see the remaining budget of the project.......
Any help appreciated....
SELECT DISTINCT ProjetBaseDon.*, Contacts.*, ProjetBaseDon.[Valeur des honoraires]-((jourFtemps.TotalH)*(Emp.[taux horraire])) AS [Valeur des honnoraires], JourFtemps.TotalH AS honnoraire, JourFtemps.No_Ftemps
FROM Emp, Ftemps, (Contacts INNER JOIN (ProjetBaseDon INNER JOIN Projet_a_contact ON ProjetBaseDon.[# Projet]=Projet_a_contact.no_projet) ON Contacts.no_contact=Projet_a_contact.no_client) INNER JOIN JourFtemps ON Projet_a_contact.no_projet=JourFtemps.No_projet2
WHERE (((JourFtemps.TotalH)>0) And ((Ftemps.Numéro_Feuille_Temps)=jourftemps.no_ftemps));
Presently it not only shows the Project budget that is substracted, but also the total, and all the records everytime a new employee enters a new project in his timesheet.....
So what I want it to do is to take the hours an employee spent on a project (jourftemps.totalH) and multiplicate it by the salary/hour of the employee Emp.[taux horraire] then take that number and substract it to the total budget, so that when the administrator run the query, they see the remaining budget of the project.......
Any help appreciated....