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.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 What to use? Trigger, stored procedure, scheduler?

Author  Topic 

Sreedipto
Starting Member

1 Post

Posted - 2009-03-28 : 11:20:26
Hi Friends,
I have created a table in which there are 2 fields namely "RELEASE_DATE" and "STATUS" . I want to enter only the release date and want the "STATUS" field to be automatically inserted and updated to NEW or OLD status accordingly as after comparing the release date withe system date. For eg: if "RELEASE_DATE" = 1st Jan 08 and system date is 2nd Jan 08 then STATUS will be automatically taken as NEW.........and likewise in future it will also update the field with passing days. Please let me know how to do this........Thanks in advance.

cshah1
Constraint Violating Yak Guru

347 Posts

Posted - 2009-03-28 : 11:44:22
You should be able to do this inside stored procedure.
Be wary with triggers use them only you need it.
Go to Top of Page
   

- Advertisement -