Jordan Johnson
asked on
How can I get this SQL count query to return 0 count results?
Here is the query example:
Can anyone point me in the right direction? Thanks!
strSQL = "SELECT substring(empno, 2, LEN(empno)),
substring(email, 1, LEN(email)-15),
IsNull(COUNT(DISTINCT recid),0) as thecount
from reldocnotes
left outer join techstaff ON reldocnotes.enteredby = substring(email, 1, LEN(email)-15)
where techstaff.active <> '0' AND
substring(techstaff.empno, 2, LEN(techstaff.empno)) <> '127' AND
thedate between '"&startDate&"' AND '"&endDate&"'
group by substring(techstaff.empno, 2, LEN(techstaff.empno)), substring(techstaff.email, 1, (LEN(techstaff.email)-15))
order by thecount " & sortonorder & ";"
Can anyone point me in the right direction? Thanks!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.