S
Stephen
Does anyone know the syntax to convert the following MS Access MDB query to
an Access Project SQL view/function?
PARAMETERS pClientId Number;
SELECT S.stateName, Count(CL.locationCity) AS locationCount
FROM tblStates AS S INNER JOIN tblClientLocations AS CL ON
S.stateId = CL.stateId
WHERE CL.clientId = pClientId
GROUP BY S.stateName
UNION
SELECT S.stateName, 0
FROM tblStates AS S
WHERE S.stateId NOT IN (SELECT DISTINCT stateId FROM
tblClientLocations AS CL WHERE CL.clientId = pClientId)
ORDER BY stateName
-Stephen
an Access Project SQL view/function?
PARAMETERS pClientId Number;
SELECT S.stateName, Count(CL.locationCity) AS locationCount
FROM tblStates AS S INNER JOIN tblClientLocations AS CL ON
S.stateId = CL.stateId
WHERE CL.clientId = pClientId
GROUP BY S.stateName
UNION
SELECT S.stateName, 0
FROM tblStates AS S
WHERE S.stateId NOT IN (SELECT DISTINCT stateId FROM
tblClientLocations AS CL WHERE CL.clientId = pClientId)
ORDER BY stateName
-Stephen