Hi.
I've recently tried to create a quey which would give me the cases I'm working with, the name of the employee, and how many people the employee has "recruited" for the case.
But for some odd reason the query shows only 5 employees out of 23, and they just loop them over and over.
My SQL looks like this:
SELECT DISTINCTROW Arbejdsseddeltimer.ProjektId, Arbejdsseddeltimer.ArbejdsseddelId, Medarbejdere.MedarbejderId, Medarbejdere.Fornavn, Medarbejdere.Efternavn, Sum(Arbejdsseddeltimer.Antal_Rek) AS [Sum Of Antal_Rek]
FROM Medarbejdere INNER JOIN (Arbejdsseddeltimer INNER JOIN Arbejdssedler ON Arbejdsseddeltimer.Antal_Rek = Arbejdssedler.Antal_Rek) ON Medarbejdere.MedarbejderId = Arbejdssedler.MedarbejderId
GROUP BY Arbejdsseddeltimer.ProjektId, Arbejdsseddeltimer.ArbejdsseddelId, Medarbejdere.MedarbejderId, Medarbejdere.Fornavn, Medarbejdere.Efternavn;
A little translation for some of the words:
Arbejdsseddeltimer: This means the amount of hours spend on a specific worktable.
ArbejdsseddelId: This is the Id number for the specific employee's worktable.
Efternavn: Last name
Fornavn: Surname
Medarbejdere: Employees
MedarbejderId: The Id number for a specific employee.
ProjektId: The Id number for a specific project
Any ideas on this?
I've recently tried to create a quey which would give me the cases I'm working with, the name of the employee, and how many people the employee has "recruited" for the case.
But for some odd reason the query shows only 5 employees out of 23, and they just loop them over and over.
My SQL looks like this:
SELECT DISTINCTROW Arbejdsseddeltimer.ProjektId, Arbejdsseddeltimer.ArbejdsseddelId, Medarbejdere.MedarbejderId, Medarbejdere.Fornavn, Medarbejdere.Efternavn, Sum(Arbejdsseddeltimer.Antal_Rek) AS [Sum Of Antal_Rek]
FROM Medarbejdere INNER JOIN (Arbejdsseddeltimer INNER JOIN Arbejdssedler ON Arbejdsseddeltimer.Antal_Rek = Arbejdssedler.Antal_Rek) ON Medarbejdere.MedarbejderId = Arbejdssedler.MedarbejderId
GROUP BY Arbejdsseddeltimer.ProjektId, Arbejdsseddeltimer.ArbejdsseddelId, Medarbejdere.MedarbejderId, Medarbejdere.Fornavn, Medarbejdere.Efternavn;
A little translation for some of the words:
Arbejdsseddeltimer: This means the amount of hours spend on a specific worktable.
ArbejdsseddelId: This is the Id number for the specific employee's worktable.
Efternavn: Last name
Fornavn: Surname
Medarbejdere: Employees
MedarbejderId: The Id number for a specific employee.
ProjektId: The Id number for a specific project
Any ideas on this?
Last edited: