
-----need help with stored proc---PLEASE
Heya, Ken!
From what I can tell, d_t is *not* being used in context of a table with
your DATEADD function. As such, the parser can't determine what it is,
hence the error.
I don't know if you're trying to update every field in the table or just
from tblBlackBall
begin
begin
return 1
end
else
begin
delete tblBlackball
end
end
Hope this helps!
John Peterson
Quote:
> the following procedure is giving me fits. it tells me d_t is an invalid
> field. I've simplified this getting rid of the control-flow structure and
no
> matter what I do I get the same syntax error.
> Create Procedure checkblackball
> AS
> BEGIN
> IF (dateadd(day,-d_t,GETDATE())) < 24
> RETURN 1
> ELSE
> BEGIN
> RETURN
> END
> END
> RETURN
> even if I get rid of everything and just compare the field I get the same
> error. I've checked all the obvious things. Please don't answer that I
> should make sure that is the correct field name.
> Thanks in advance,
> Ken Corley
> Space Age Services, Inc.