Hopefully somebody here can help me, I am fairly new to SQL Server. I have
 SQL Server 2000 running on a Windows 2000 Server. I have a table called
 StudentInfo with a field called Date. I want the Date field to only accept
 the current date. This field gets updated by teachers every day when they do
 their attendance. In Access I used a validation rule of date(). In SQL I
 created a contraint on the StudentInfo table and in the constraint
 expression I put Date = date(). I have unchecked "validate existing data"
 but left the other 2 boxes checked. However, I get the following error -
 Error validating check constraint. I think I probably have the wrong syntax
 in my contraint expression, can anybody help?
 Thanks.
 Kevin> Hopefully somebody here can help me, I am fairly new to SQL Server. I have
> SQL Server 2000 running on a Windows 2000 Server. I have a table called
> StudentInfo with a field called Date. I want the Date field to only accept
> the current date. This field gets updated by teachers every day when they
do
> their attendance. In Access I used a validation rule of date(). In SQL I
> created a contraint on the StudentInfo table and in the constraint
> expression I put Date = date(). I have unchecked "validate existing data"
> but left the other 2 boxes checked. However, I get the following error -
> Error validating check constraint. I think I probably have the wrong
syntax
> in my contraint expression, can anybody help?
Set the following constraint:
Date = GETDATE()
sincerely,
--
Sebastian K. Zaklada
Skilled Software
http://www.skilledsoftware.com
This posting is provided "AS IS" with no warranties, and confers no rights.|||Thank You.
Kevin
"Sebastian K. Zaklada" <szaklada-dont-like-spam@.skilledsoftware.com> wrote
in message news:%23tJ18zy7DHA.3860@.tk2msftngp13.phx.gbl...
> > Hopefully somebody here can help me, I am fairly new to SQL Server. I
have
> > SQL Server 2000 running on a Windows 2000 Server. I have a table called
> > StudentInfo with a field called Date. I want the Date field to only
accept
> > the current date. This field gets updated by teachers every day when
they
> do
> > their attendance. In Access I used a validation rule of date(). In SQL I
> > created a contraint on the StudentInfo table and in the constraint
> > expression I put Date = date(). I have unchecked "validate existing
data"
> > but left the other 2 boxes checked. However, I get the following error -
> > Error validating check constraint. I think I probably have the wrong
> syntax
> > in my contraint expression, can anybody help?
> Set the following constraint:
> Date = GETDATE()
> sincerely,
> --
> Sebastian K. Zaklada
> Skilled Software
> http://www.skilledsoftware.com
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
 
No comments:
Post a Comment