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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

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

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

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.

Very Important crosS Applying yaK Herder

52326 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

Go to Top of Page
  Previous Topic Topic Next 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.02 seconds. Powered By: Snitz Forums 2000