I'm trying to determine the percent of null items for all fields of a table. I have to run this on several tables with a ton of fields, and I was looking for an automated way of doing this.
I know I can query "information_schema.columns" and get a nice clean list of field names ala:
select Column_name
from information_schema.columns
where table_name='TableName'
But I can't seem to come up with something quick and dirty to do the percentage count for each field, I'm guessing I'll need some dynamic sql of some sort? Anyone have a suggestion on a good way to approach this?