Hello all --
Here's the situation -- I need to pull a simple average from a table based on a few criteria, but I can't seem to come up with the correct syntax... I'm using SQL Server.
I have a field in a table that contains numbers from 1 to 10, and some that are NULL --
I need to be able to pull a decimal value from the table that represents the percentage of values that are between 8 and 10, but not including the NULL values in the base that I divide by.
example:
12 rows
2 -- NULLs
8 -- 8, 9, or 10's
2 -- 1 - 7's
Value desired would be .8 -- 8/10
See what I'm getting at?
Thanks for any input --
Paul Prewett
Here's the situation -- I need to pull a simple average from a table based on a few criteria, but I can't seem to come up with the correct syntax... I'm using SQL Server.
I have a field in a table that contains numbers from 1 to 10, and some that are NULL --
I need to be able to pull a decimal value from the table that represents the percentage of values that are between 8 and 10, but not including the NULL values in the base that I divide by.
example:
12 rows
2 -- NULLs
8 -- 8, 9, or 10's
2 -- 1 - 7's
Value desired would be .8 -- 8/10
See what I'm getting at?
Thanks for any input --
Paul Prewett