Click here to Skip to main content
15,885,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a table in ms sql server. I want to set trigger that whenever today is finishdate the column IsActive is set to false. or MaxNotification & MaxArticles & MaxVideos & MaxEvent = 0 Set IsActive = false.
How would i achieve this...please help...


SQL
Create Table TblSubscription
(
SubscriptionId int identity(1,1) Primary key,
UserId INT NOT NULL Foreign key References TblUser(UserId),
PackageId INT NOT NULL Foreign key References TblPackages(PackageID),
ConstID INT NOT NULL Foreign key References TblConstituency (ConstID),
StartDate datetime,
FinishDate datetime,
MaxNotification int,
MaxArticles int,
MaxVideos int,
MaxEvent int,
MaxAllias int,
Cost float,
IsActive bit,
IsPaid bit
);
Posted

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900