And as I meant to include originally, but left out; thanks to Dominique Boucher for pointing it out , you would then create a SQL Server job to run this statement. You can schedule this to run as frequently as you want; if it normally completes in under a minute, you could schedule it for every minute, even.
Odds are every minutes will be adequate for most purposes, but that's up to you to determine. Note, however, that the statement could impact performance. If there are a large number of records to update each time the job is run, then car records could be locked longer than desired; it's even possible that the DB engine could decide to lock the car table if there are enough changes in a run. There are ways to manage this if it becomes a problem, but thought I should mention it in passing, since I don't know how active the site will be.
And you can create a job in the SQL Agent that would run every, let say, 5 min and update all row that are in "pending confirmation" for more then 24 hours. Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. Asked 4 years ago.
Active 4 years ago. Viewed times. Improve this question. Tom V Viewed times. I have tried a query. Improve this question. Andriy M 73k 16 16 gold badges 90 90 silver badges bronze badges. Gallop Gallop 1, 3 3 gold badges 15 15 silver badges 27 27 bronze badges. Thanks — Gallop. I mean can you edit your query and show a output table?
I edited your question with the output you are expecting. Add a comment. Active Oldest Votes. I think you have to provide more information so we can help you. Improve this answer. Diego Diego I want to check for the above mentioned conditions and then update the Transaction Type column in the Transaction table as Warranty if the vehicle was purchased before 2 years.
It seems that you can do everything using SQL queries. United States English. Ask a question. Quick access. Search related threads. Remove From My Forums. Answered by:. Archived Forums. Getting started with SQL Server. Beginners just getting started - here's the place for help with simple questions. For installation or setup questions, refer to the Setup Forum.
0コメント