SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 SQL Project Advise
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

chapm4
Yak Posting Veteran

58 Posts

Posted - 03/28/2012 :  14:54:15  Show Profile  Reply with Quote
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

India
52309 Posts

Posted - 03/28/2012 :  14:57:30  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000