May 21, 2010 at 4:27 am
Hello,
I have an odd problem that is causing me some frustration. When I execute a CREATE PROC or ALTER PROC statement in SQL Management Studio, the query will complete successfully even when the procedure statements reference non-existant objects.
I am used to the query failing with a error stating that the object does not exist. Is there some database, server or query configuration option that I have forgotten or overlooked?
The following code demonstrates the issue.
CREATE PROCEDURE testProc AS SELECT * FROM NonExistentTable
GO
When I execute this code, I get the message "Command(s) completed successfully."
But when I execute the procedure, thus:
EXEC testProc
I get the message "Msg 208, Level 16, State 1, Procedure testProc, Line 1
Invalid object name 'NonExistentTable'."
Shouldn't the "Invalid bject name" error occur when I execute the CREATE PROCEDURE query??
Any advice welcome.
May 21, 2010 at 6:17 am
duplicate post, do not reply to this thread.
continue the discussion here
Lowell
May 21, 2010 at 6:27 am
Sorry - Did not see
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply