Stored Procedure for database clean-up
5285
$$
- Posted:
- Proposals: 2
- Remote
- #13137
- Archived
Description
Experience Level: Intermediate
I have an application that reads data from different sources and then posts that data into a \"Readings\" table (Source_ID, Date, Time_slot, Reading). If my application cannot connect to the source it posts an entry with \"-1\" in the Reading field.
I am looking for a Stored Procedure that works through the database, identifies the missed readings, i.e. those with -1 (grouped by Source_ID), identifies the number of consecutive missed readings, then takes the value from the first successful read following the missed readings and equally divides it over all the missed readings including the first successful read and also posts a Y into a new field called \"Averaged\" for the readings that have been updated.
Database is SQL Server 2005. A sample database can be supplied to test against.
Project deliverables to include source code and all intellectual property rights including copyright.
I am looking for a Stored Procedure that works through the database, identifies the missed readings, i.e. those with -1 (grouped by Source_ID), identifies the number of consecutive missed readings, then takes the value from the first successful read following the missed readings and equally divides it over all the missed readings including the first successful read and also posts a Y into a new field called \"Averaged\" for the readings that have been updated.
Database is SQL Server 2005. A sample database can be supplied to test against.
Project deliverables to include source code and all intellectual property rights including copyright.
Brian H.
100% (3)Projects Completed
9
Freelancers worked with
6
Projects awarded
64%
Last project
18 Aug 2022
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies