Ok, so here's a database table with one field in it -- the field contains numbers that range from 1 - 10, and some of the fields don't have entries at all (Ok, the table has more than one field, but let's keep it simple for now) --
So, what I would like to do is to be able to, with one SELECT statement, get a percentage of the fields that contain an 8, 9, or a 10, ignoring the blank fields...
i.e. if there are 12 fields, and two of them are blank (base just went to 10 from 12), 8 of them have an 8, 9, or a 10, and 2 of them have 1's, then the resulting value would be .8 -- 8 / 10
See what I'm getting at?
I currently use a more complicated method to get at this number -- with coding -- but would like to get it to work with SQL, so it would execute faster...
Thanks for any input!
Paul Prewett
So, what I would like to do is to be able to, with one SELECT statement, get a percentage of the fields that contain an 8, 9, or a 10, ignoring the blank fields...
i.e. if there are 12 fields, and two of them are blank (base just went to 10 from 12), 8 of them have an 8, 9, or a 10, and 2 of them have 1's, then the resulting value would be .8 -- 8 / 10
See what I'm getting at?
I currently use a more complicated method to get at this number -- with coding -- but would like to get it to work with SQL, so it would execute faster...
Thanks for any input!
Paul Prewett