Kal
07-05-2011, 03:35 PM
Hi,
I have the following query, however need help in modifying it to only return the count of rows that it produces.
SELECT
LEFT(JobLocationPostcode, locate(' ', JobLocationPostcode)) AS postcode,
COUNT(JobStatusCode) AS jobs
FROM
jobs
WHERE
JobId > 125000 AND JobLocationType = 'M' AND JobStatusCode <> 'YA' AND JobWorkBranchId = '22739'
GROUP BY
postcode
ORDER BY
postcode
Any help would be great.
Thanks
I have the following query, however need help in modifying it to only return the count of rows that it produces.
SELECT
LEFT(JobLocationPostcode, locate(' ', JobLocationPostcode)) AS postcode,
COUNT(JobStatusCode) AS jobs
FROM
jobs
WHERE
JobId > 125000 AND JobLocationType = 'M' AND JobStatusCode <> 'YA' AND JobWorkBranchId = '22739'
GROUP BY
postcode
ORDER BY
postcode
Any help would be great.
Thanks