Trying to run the following script in SQL Server 2005. The syntax checks out fine but when I execute it I get:
Msg 2714, Level 16, State 3, Procedure ehe_ConditionSubForm, Line 22
There is already an object named 'ehe_ConditionSubForm' in the database.
There is NO stored proc or anything else with that name. I changed the name and it ran without errors but I couldn't find the procedure with the new name! Anyone know whats going on here?
Msg 2714, Level 16, State 3, Procedure ehe_ConditionSubForm, Line 22
There is already an object named 'ehe_ConditionSubForm' in the database.
There is NO stored proc or anything else with that name. I changed the name and it ran without errors but I couldn't find the procedure with the new name! Anyone know whats going on here?
Code:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE ehe_ConditionSubForm
@iGrpFilter int = 0
AS
BEGIN
SET NOCOUNT ON;
SELECT LS.[CnCode], LS.[SvyNumber],
LS.[Answer], LS.[Date], LS.[Initials],
LC.[Category], LC.[Condition], LC.[Action],
LS.[Comment], LC.[Regulation], LC.[Order1]
FROM tblLabSurveyCondition AS LS INNER JOIN tblListCondition AS LC ON
tblLabSurveyCondition.[CnCode] = tblListCondition.[ID]
WHERE (LS.Answer=3 And @iGrpFilter=3)
Or (@iGrpFilter=1)
ORDER BY tblListCondition.[Order1]
END
GO