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.

Recommended Answers

All 2 Replies

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.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.