Showing posts with label nonconformance. Show all posts
Showing posts with label nonconformance. Show all posts

Saturday, February 25, 2012

can someone tell me why this sql statement doesnt work?

can someone tell me why this sql statement doesnt work?

SQL = "SELECT (Count(department_id) as 'totals' FROM nonconformance WHERE department_id = '7'),(Count(department_id) as 'totals2' FROM nonconformance WHERE department_id = '1') FROM nonconformance"

How do I fix it?

Thanks...

SQL = "SELECT Totals = (SELECT Count(*) FROM nonconformance WHERE department_id=7), Totals2 = (SELECT Count(*) FROM nonconformance WHERE department_id=1)"|||thanks, works great