bit hasRepeatRecord = NOT EXISTS(SELECT PostId FROM MaterialList WHERE UserId=@UserId AND ClassCode=@ClassCode AND (datediff(day,PostDate,getdate())=0 OR datediff(day,RefreshDate,getdate())=0)
IF ( @PostAction = 0 AND hasRepeatRecord )
beginend错误提示:
Server: Msg 170, Level 15, State 1, Procedure MaterialCreateUpdateDelete, Line 72
Line 72: Incorrect syntax near 'bit'.
Server: Msg 156, Level 15, State 1, Procedure MaterialCreateUpdateDelete, Line 73
Incorrect syntax near the keyword 'IF'.
Server: Msg 170, Level 15, State 1, Procedure MaterialCreateUpdateDelete, Line 73
Line 73: Incorrect syntax near ')'.
Server: Msg 156, Level 15, State 1, Procedure MaterialCreateUpdateDelete, Line 166
Incorrect syntax near the keyword 'END'.
IF ( @PostAction = 0 AND hasRepeatRecord )
beginend错误提示:
Server: Msg 170, Level 15, State 1, Procedure MaterialCreateUpdateDelete, Line 72
Line 72: Incorrect syntax near 'bit'.
Server: Msg 156, Level 15, State 1, Procedure MaterialCreateUpdateDelete, Line 73
Incorrect syntax near the keyword 'IF'.
Server: Msg 170, Level 15, State 1, Procedure MaterialCreateUpdateDelete, Line 73
Line 73: Incorrect syntax near ')'.
Server: Msg 156, Level 15, State 1, Procedure MaterialCreateUpdateDelete, Line 166
Incorrect syntax near the keyword 'END'.
set hasRepeatRecord=1
else
set hasRepeatRecord=0IF ( @PostAction = 0 AND hasRepeatRecord )
begin
end
)
beginend