One more update about Ms Navision, it's over 20 000 columns in the DB (with 2-3 add ons)... only 53 of them are nullable (image datatype). So sparse seems out of the question at the moment.
Also the way the script is made makes a table scan for every column in every table, this would seem more appropriate :
INSERT INTO #tmp
UNPIVOT
SELECT
COUNT(CASE WHEN ColName IS NULL THEN 1 ELSE 0 END), 'Schema.ColName'
COUNT(CASE WHEN ColName2 IS NULL THEN 1 ELSE 0 END), 'Schema.ColName'
COUNT(CASE WHEN ColName3 IS NULL THEN 1 ELSE 0 END), 'Schema.ColName'
FROM dbo.TableName
Then go back and run COUNT(*) FROM the base tables only once or even use syspartitions to avoid completly.
It would also be nice to add another where condition in the final select (or even first select) where only tables with more than 10 000 rows or whatever is appropriate are shown. In my system, the query tells me I should use sparse columns on tables with 1 row... it's kind of hard to justify going through all the process for that little gain.