Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Force Query To Return 0 not null

$
0
0

This is my syntax and it does not return any results, which is accurate, but how can I set it to return a '0' instead of a blank result set?  I REALLY need this to take place within a query and not a stored procedure, if at all possible...

Select count(a.empID) As employeeID, b.employeePhone, 'Employee Info' As data
FROM tableMaster b Inner Join tableBadSetup a
ON a.empID = b.empID
Where b.empStatus = 'Leave'
Group By b.employeePhone


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>