Query:
SELECT TOP 1 ReportInvoked , EmailSent FROM tblReportInvoker WHERE WebUserId = 12345
This gives me two bit values. What I really want is a scalar result, which is a logical AND of these two values. Is it possible? It seems to be easy, but I do not find the syntax that will work.
Edit: Of course, the flaw in my smart plan is that it would be true if both processes fail, so the revised request is:
SELECT TOP 1 (ReportInvoked & EmailSent) & (1 & ReportInvoked) AS 'ReportSent' FROM tblReportInvoker WHERE WebUserId = 12345
source share