954,593 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

updating for a period of time

I have a database that continually receives information from outside sources. I then use SQL code to take this data and move to different databases based on the information received. As it stands right now, if I receive a '1', '2', '3', from an outside source, we manually move it. Is it possible to move the data for a period of time if a certain data set enters the database? i.e. I receive a '2' from the outside source and for the next 5 minutes, all data from that source is automatically transferred. After the 5 minutes is up, the data needs to be moved manually again until a '2' is received again.

smeboyds
Newbie Poster
1 post since Feb 2012
Reputation Points: 10
Solved Threads: 0
 

As a general rule, SQL is build to handle group of records (matching criteria) simultaneously. Your description looks like you are thinking linear processing, which will not work that well with SQL and it will definately not allow you to use your server 100%.
Anyway, you'll need to provide more info on what you are building, perhaps other have done something similar and can share practises or we can get a better idea of your need.

Assuming a lot, if this is not a time critical application, you could search for the 1st unhandled '2' and get all messages followed by that in a 5 min window. Unfortunately you'd have to run this every x mins and would read messages already in the db - it won't wait for new messages to act on.

adam_k
Practically a Posting Shark
804 posts since Jun 2011
Reputation Points: 256
Solved Threads: 149
 

You can schedule it. MS SQL has scheduling, so you can process your task here let say every 5 mins.

Cruize_Invades
Light Poster
40 posts since May 2007
Reputation Points: 6
Solved Threads: 7
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You