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

SQL query question

$
0
0

EmplyeeJobs table has a column "Status" is bit type and possible value is 1, 0 and null.

One EmployeeJobs may have mutltiple rows with different status values in a day.

we need to get status for each day for employee if there is at least one "Status" = 1 return one, otherwise, return zero. 

we try to use Max(Status), and get an error "Operand data type bit is invalid for max operator."

How do we achive that by using SQL query? Thx!


JaneC



Viewing all articles
Browse latest Browse all 23857

Trending Articles



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