Help with a trigger - calculated column

I have a table with an end date column and a  long value that is a status.  I want to set the status to a specific value whenever the current date is great than the end date.  I know how to create a calculated column, but that requires a value in a column to change.  How do I trigger a value change based on the current date?
Who is Participating?

Improve company productivity with a Business Account.Sign Up

Jim HornConnect With a Mentor Microsoft SQL Server Developer, Architect, and AuthorCommented:
A trigger will fire when row(s) are inserted-updated-deleted, and gives the developer full control over what happens for the set of rows that are inserted-updated-deleted, and not for every row.

A calculated column is calculated on select, so in effect every time you access the column.
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
>but that requires a value in a column to change.
Explain why this matters, as it's not clear why a calculated column can not meet your requirements.
HLRosenbergerAuthor Commented:
I could be all wet.   How/when does the comparision of the end date to current date take place?  I mean what triggers that?
HLRosenbergerAuthor Commented:
Ah, so calculated should work then,   Thanks.
HLRosenbergerAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.