A developer came to me a few days ago, wondering why when he specifies an invalid table name in a stored procedure, the proc saves to the database, but when he specifies an invalid column name it fails.
Looks like the deferred name resolution only works w/ missing tables…not w/ missing columns: http://msdn.microsoft.com/en-us/library/ms190686.aspx
For instance, this succeeds on an DB:
create proc cp_test
as
select somecolumn from tFakeTable –fake column, fake table
This fails on an DB:
create proc cp_test2
as
select somecolumn from tActualTable–fake column, real table
Wow, I didn’t heard about this topic up to the present. Cheers!
So what do I do to get an error message when this thing happens ??
Hello my name is Tami Sandoval and I just wanted to send you a quick note here instead of calling you. I discovered your Deferred Name Resolution, or “Why does my proc allow invalid table names?” | Real World DBA website and noticed you could have a lot more hits. I have found that the key to running a successful website is making sure the visitors you are getting are interested in your website topic. There is a company that you can get keyword targeted visitors from and they let you try the service for free for 7 days. I managed to get over 300 targeted visitors to day to my website. http://soheavyblog.com/1m