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
 General SQL Server Forums
 New to SQL Server Programming
 Update Trigger

Author  Topic 

ohad
Starting Member

1 Post

Posted - 2007-04-20 : 15:32:15
Hi
i have table (1) with field called "StartDate"(datetime)
and another table (2) with field called "Period"(int)
when i add (dateadd) "Period" to "StartDate" it's give a new date.
I need to create trigger that calculate "Period"+"StartDate"
and if the new date is smaller than current date(getdate())
the trigger update field called "valid"(bit)(in table 1) to 0
and if the new date ("Period"+"StartDate") is bigger than current date the field "valid" need to be updated to 1

Thank for help

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-04-20 : 16:15:43
Please post what you have so far.

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -