Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Greeting everyone

i'm new here and i'm looking for answer for my question
my idea is change value of row after certain time only once
i have column in my table content number which considered as minutes

if there's number on that column mean this row will be update after minutes on that column

and if there's no number on that column there's will be no change

the update will be only once on that row which content number (minutes)


how can i do that?


i'm using that for my c# project

What I have tried:

i really don't know how start that code because or where must be put it
Posted
Updated 4-Jan-20 22:36pm

1 solution

If you need to do something in the database based on an interval, you cannot execute the code in a trigger since trigger is executed immediately upon the data manipulation.

Taken this is SQL Server, you can use SQL Server Agent - SQL Server Agent | Microsoft Docs[^] to execute code on a regular interval and update the rows you want.

If you're using SQL Server Express Edition, SQL agent is not available. In that case you could use for example SQL Agent: A Job Scheduler Framework[^]

You also probably need to add a column in your table to distinguish the records that have been updated from those not yet updated...
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900