Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Database Population Statistics

Author  Topic 

mrees
Starting Member

2 Posts

Posted - 2005-04-01 : 06:06:38
I need to write a query that works out percentage completion for certain areas of the database I manage.

Firstly, I need to work out the percentage completion of every column. i.e. look down a column count the number of cells with data then work out a percentage against the number of rows.

Secondly, I need to look along a row (a row represents a project record) and count the number of cells containing data, then work out a percentage against the number of columns.

This is pretty simple in Excel (and I have actually been tracking population stats using a spreadsheet believe it or not) however I want to be able to do this within my SQL database.

Be grateful for any help you can offer.

Thanks

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2005-04-01 : 06:51:21
Provide sample input data and sample matching expected results (and supporting DDL (and INSERT statements) if possible) to advance this faster.
Go to Top of Page

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2005-04-01 : 10:36:29
Post some more specs...
And,
SQL Server is a Database, NOT a Spreadsheet program.
I am sure that You need to design your tables differently than spreadsheets.


rockmoose
Go to Top of Page
   

- Advertisement -