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)
 Multiple Amounts of Summarized Data

Author  Topic 

edb2003
Yak Posting Veteran

66 Posts

Posted - 2003-11-19 : 10:43:26
Good Morning to all and a special thanks for everyones input :)

I need to build a Report on gathering totals and percentages in information on a table in SQL Server. I was planning on building a bunch of Stored Procedures and have them as templates, then make one master Stored procedure to grab them all and run the process.

Has anyone done anything like this? Can someone outline a successful process as I am entering into new terrritory that I have not experienced.

Happy Day and Happy Coding
Edb

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2003-11-19 : 11:00:28
Can you give an example of your table structure, and some sample data, and what you want to return?

You should only need 1 stored procedure, and probably that should only need to be 1 SELECT statement.

Don't complicate things any more than you need to!

- Jeff
Go to Top of Page

edb2003
Yak Posting Veteran

66 Posts

Posted - 2003-11-19 : 13:27:55
No problem,

Consider 100,000 records with a column called "Hits". I also have a column called sites. I need to grab the total of all records that have Microsoft in the sites column.

Second task
I have a date column and need to get the total of Item 1 above with todays date.

Third task
I need to get a 7 day average of "Hits".

Fourth task
I need to get a percentage of Daily leads based on column Desired Goal and column Daily Goals Met.

This may be a job for Crystal Reports. I am investigating this option as well but would appreciate other options.

Thx, :)
Edb
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-11-19 : 13:43:51
Edb, take a look at this thread for how to post the information that Jeff has requested (table structure, sample data, and expected result set):

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=29090

Tara
Go to Top of Page
   

- Advertisement -