Click here to Skip to main content
15,895,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hear is my code want to know how will IsActive ='Y' Automatic After 90 Days


SQL
SELECT * FROM FacultyRelievingDetails
WHERE ApplyDate >= DATEADD(DAY, -90, ApplyDate) And FacultyId='LCVD-2003396' AND CollegeId=387 AND IsRelieved='Y'



please Help Me

What I have tried:

Hear is my code want to know how will IsActive ='Y' Automatic After 90 Days


SELECT * FROM FacultyRelievingDetails
WHERE ApplyDate >= DATEADD(DAY, -90, ApplyDate) And FacultyId='LCVD-2003396' AND CollegeId=387 AND IsRelieved='Y'


please Help Me
Posted
Updated 8-Jun-16 11:23am
v3
Comments
OriginalGriff 8-Jun-16 3:36am    
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
So we have no idea what "IsActive='Y'" is supposed to mean, or where it's supposed to be stored, or when this should be done, or ... anything really!
Use the "Improve question" widget to edit your question and provide better information.
Kornfeld Eliyahu Peter 8-Jun-16 17:07pm    
In database value changes only if someone updates it...It can be direct update, a trigger or some job...However, in your code there is no update whatsoever (actually filed by name 'IsActive' not there either), so no value will change ever...

1 solution

All what you need is to create computed column. See: Specify Computed Columns in a Table[^]
 
Share this answer
 
Comments
Maciej Los 9-Jun-16 4:19am    
I would like to say: "Thank you" for downovoter (member) who's afraid to say why my answer deserves for downvote.

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