November 22nd, 2011, 03:58 PM
Here is what I am trying to do:
I have a MSSQL table that is being written to every 5 minutes with data, so this amounts to 288 points of data every 24 hours. I need to be able to have a stored procedure that will give me the MAX value found within that most recent 24 hour period. The 24 hour period needs to have a fixed pointer that starts at 12 AM on the present day. So basically I would like to be able to run the stored procedure periodically at will, which would then return the MAX value of the accumulated data from the current 24 hour period.
Your expertise would be appreciated thank you in advance.
November 23rd, 2011, 03:41 AM
Write a query.
use the date column in your table if you have one
select max(id) from table where your datecolumn >= 00:00 and
datecolumn <= 12:00 PM
November 27th, 2011, 07:15 PM
The first step in making a query into a stored procedure is to have a functioning query. You haven't told us much about your data. Do you have a functional query that delivers what you want? How are you intending to call your stored procedure? An ASP Web page?
Brinkster- free development account. Not affiliated, but I sure like free. Brinkster.com
November 28th, 2011, 07:35 AM
Appreciate the replys ,
I have been working on the querys without much success ..
November 28th, 2011, 11:05 PM
This is like a school assignment. You have to show your work.
Show us what you have and tell us about the data.
November 29th, 2011, 11:17 PM
Getting things done through this has always been great for every one and for us as well........
www dealaboo dot Com