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.

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. ;)

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

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)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.