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 2008 Forums
 Transact-SQL (2008)
 SQL Project Advise

Author  Topic 

chapm4
Yak Posting Veteran

58 Posts

Posted - 2012-03-28 : 14:54:15
Created a simple stored procedure that creates 2 tables by pulling local data from corporate linkedserver database. I will create an agent to run this every 24 hours.

I have 10 different sql queries that I run manually that return sometimes single pieces of information based on those two tables. For instance

SELECT MAX(EventDate) AS LRI
FROM tbl_HealthAndSafetyEventList
WHERE (inrCode = 'HS3') OR (inrCode = 'HS4') OR (inrCode = 'HS5') OR (inrCode = 'HS6') OR (inrCode = 'HS7') OR (inrCode = 'HS9')


Returns 2011-09-09

This will land on an ASP page on the intranet. The client doesn't feel that it is necessary to do the query in ASP because of the number of times the page will be hit daily, and nearly all of the information will not change in 24 hours. I am not secure in my knowledge to argue for or against.

My feeling is that I can build the SP to run each of these queries and build views which in turn will be pulled for the web page. Is that the proper way to go? Client is using SQL 2008.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-03-28 : 14:57:30
if its not going to change you can put values in a table which gets populated using sp that runs through sql agent every night.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -