How to use CASE over here? I don't want it to be part of my SELECT clause. The condition has to be in the WHERE clause.
My first part of the query has to be 'select count(1) from Pat' only.
What will hold "Y" and "N". Some text box or some variable?
The value comes from the HL7 message, if you know this ... Its a healthcare standard message, which is used for data flow.
I get the data from this HL7 message as the actual value.
However am stuck, as I dont want to replace it directly. Also, I cant write the logic in some programming language. All the conditions have to be incorporated in a simple query only..