Hi,
When i used sum() function in the SQL queries in MS Access for calculating the age of people in a database. i can able to get the result but the result comes out with a minus (negative) sign in front of it..
I had posted my SQL query below
select sum(year(now())-year([date_of_birth])<30) as Less_than_30, sum(year(now())-year([date_of_birth])>=30) as 30_and_more from students
Can anyone please explain about this and suggest a solution..
Thank You
Arvind
When i used sum() function in the SQL queries in MS Access for calculating the age of people in a database. i can able to get the result but the result comes out with a minus (negative) sign in front of it..
I had posted my SQL query below
select sum(year(now())-year([date_of_birth])<30) as Less_than_30, sum(year(now())-year([date_of_birth])>=30) as 30_and_more from students
Can anyone please explain about this and suggest a solution..
Thank You
Arvind
Comment