Hi
I have a table with 60 columns of integer data. I need to be able to count the number of columns where the values are between 1 and 12, 13 and 24, 25 and 36.......
What i'm actually looking for is an equivalent to Excels COUNTIF function.
First your database structure is seriously flawed, you will never be able to properly query or maintain this database with such a poor structure. You should have a related table for this information not separate fields.
However, I recognize you may not have designed it and may be stuck with the structure. How to solve the problem then?
YOu could create a union statement to get the proper infor from each table into a set of fields. Then use it as a derived table and sum the fields.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.