theunknownknight
MIS
SELECT projectreview.ProjNum, Count(projectreview.Login) AS "LC", (select Count(login.pkey) from login)-1 AS "LC1"
FROM projectreview INNER JOIN login ON projectreview.Login = login.PKey WHERE "LC" <> "LC1"
GROUP BY projectreview.ProjNum;
returns this:
ProjNum LC LC1
1002 3 4
1003 4 4
1007 4 4
1008 2 4
1010 1 4
I want to retrieve 1003 and 1007 so I edit the above query to this:
SELECT projectreview.ProjNum, Count(projectreview.Login) AS "LC", (select Count(login.pkey) from login)-1 AS "LC1"
FROM projectreview INNER JOIN login ON projectreview.Login = login.PKey WHERE "LC" = "LC1"
GROUP BY projectreview.ProjNum;
It then returns nothing. Does anyone know why or How I can fix this?
FROM projectreview INNER JOIN login ON projectreview.Login = login.PKey WHERE "LC" <> "LC1"
GROUP BY projectreview.ProjNum;
returns this:
ProjNum LC LC1
1002 3 4
1003 4 4
1007 4 4
1008 2 4
1010 1 4
I want to retrieve 1003 and 1007 so I edit the above query to this:
SELECT projectreview.ProjNum, Count(projectreview.Login) AS "LC", (select Count(login.pkey) from login)-1 AS "LC1"
FROM projectreview INNER JOIN login ON projectreview.Login = login.PKey WHERE "LC" = "LC1"
GROUP BY projectreview.ProjNum;
It then returns nothing. Does anyone know why or How I can fix this?