Is this code being run in a Stored Procedure?
>Below is a snippit of code, that runs but doesn't return what I want. I'm trying to get a count (meetproc) of procedures assocated with a case (meetings) as the return value from my case statement. What I get is a 1 or zero which is exactly what SQL is probably supposed to do. But I don't know how to get the count at this point. Any idea's or sugguestions?
>
>Thanks
>Kirk
>
>
>case
>when isnull(dbo.ctAdmissionType.inOrOut,0) = 0
> then (Select Count(meetprocID) from meetproc where meetproc.meetingnumber=meetings.meetingnumber)
> else 0
>end as ProcOutCount,
>case
>when isnull(dbo.ctAdmissionType.inOrOut,0) = 1
> then (Select Count(meetprocID) from meetproc where meetproc.meetingnumber=meetings.meetingnumber
> else 0
>end as ProcInCount
>
Al Williams
Anola MB, CANADA