0

Hi,
I have a query that has a condition that count persons whose blood pressure, weight and height are calculated whose age is greater than 3. I have made this query and this query is working fine but there is a condition that if the age is greater then 2 then do not care about blood pressure and see that height and weight is captured. Can any one tell me how can I accomplish this.
Thanks in advance.

2
Contributors
3
Replies
10
Views
3 Years
Discussion Span
Last Post by Taywin
0

What you need to do is to group the first set of conditions (the age > 3) inside a pair of parenthesis, and then create and group the second set of conditions (the age > 2) inside another pair of parenthesis. After you have got both sets of conditions, conjunct them with logic operator or. That's all. ;)

Edited by Taywin

0

You are saying somethin like this IF(age>3,AND (sql_statement),(or_sql_statement))

0

Hmm... I thought we are talking about SQL query? What I mean is somewhat similar to ...

SELECT ...
  WHERE
  (current_working_condition_for_age_greater_than_3) or
  (new_condition_with_age_grater_than_2)

Edited by Taywin

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.