Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
swathigardas
Posting Yak Master
149 Posts |
Posted - 2009-01-12 : 08:35:15
|
| Hi, I really dont know how to start working with it.. so posted here.. There's a Table Called Incident and table Incident Status with the foll columnsIncident_ID Posted_DT Due_Dt Status 1 01/01/2009 01/10/2009 Closed2 12/10/2008 01/13/2009 AssignedIncident StatusIncidentId StatusID Status Date 1 1 Open 01/01/2009 1 2 Assigned 01/02/2009 1 3 Assigned 01/05/2009 1 4 Escalated 01/11/2009 1 5 Closed 01/12/2009 2 1 Open 12/10/2008 2 2 Assigned 12/15/2008 Every time current Status will be updated in Incident Table by cross checking with incident Status Table.The Requirement is if the Due Date in Incident Table is today's date or greater than todays date, Status should be automatically changes to escalated and a new row should be inserted in incident status table with values incident id, status id, status and date - where the status will be escalated.This has to be automaticallly updated in the database.. How can i achieve this.. Please help me out in this..Thanks, before hand |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-01-12 : 08:45:59
|
| seems like what you need is a stored procedure which cjecks this and does the updation in the table. |
 |
|
|
swathigardas
Posting Yak Master
149 Posts |
Posted - 2009-01-12 : 10:32:10
|
| Ya even i thought of Stored Procedure, But the application wont be calling the Stored Proc anywhere. They want the values to be updated at the database end automatically.. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-01-12 : 10:34:55
|
quote: Originally posted by swathigardas Ya even i thought of Stored Procedure, But the application wont be calling the Stored Proc anywhere. They want the values to be updated at the database end automatically..
that you can do. just configure a sql job to execute the procedure and schedule it |
 |
|
|
swathigardas
Posting Yak Master
149 Posts |
Posted - 2009-01-12 : 10:50:07
|
| Yeah Right.. Thanks for the Suggestion Vishakh |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-01-12 : 11:14:06
|
| welcome |
 |
|
|
|
|
|