Error for this sql
ALTER PROCEDURE My_Procedure (@Company varchar(50)) AS SELECT PRD_DATE FROM WM_PROPERTY_DATES WITH (NOLOCK) WHERE PRD_COMPANY = @Company GO
is an
Msg 102, Level 15, State 1, Procedure My_Procedure, Line 7 Incorrect syntax near 'GO'.
Pay attention to Line 7 , the original question is Line 1 .
If I put GO on my line, SQL works fine.
Given that your error message says โLine 1โ, it looks like for some reason your sql file does not have the correct CR / LF.
source share