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
 Check constraints

Author  Topic 

jogin malathi
Posting Yak Master

117 Posts

Posted - 2007-04-11 : 04:02:11
Hi
I have a field as Releving date in which i enter employee releving date

If i enter date as 11/04/2007.
From that date employee status in master table should be inactive
So that their is no chance for employee to login

for this i don't want to call any procedure or any db object

how can i do this in back end

should i write check constraint(iam not sure of it)

Give solution to this query

Malathi Rao

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-04-11 : 04:05:16
You must change the stored procedure called when logged on to do this check for you in order to allow or deny login.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-04-11 : 04:05:43
CHECK constraints are used to validate data input in the table, not to update data based on some condition. Why don't you update the Status column from the same procedure which you use to enter relieving date?

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page
   

- Advertisement -