Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem when using count
Message
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Problem when using count
Divers
Thread ID:
00392388
Message ID:
00392388
Vues:
45
I tried this SQL in a VB app and I get an expected 1 error. Where is the error in this SQL. (What I want to do is only return employees if they have reportrequests.)

SELECT Employees.ID, Employees.FirstName,
Employees.LastName, Employees.Department,
COUNT(ReportRequests.ID) AS Ctr
FROM Employees, ReportRequests
WHERE Employees.ID = ReportRequests.EmpID AND (Ctr > 0)
GROUP BY Employees.ID, Employees.FirstName,
Employees.LastName, Employees.Department
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform