SQL Errors GlobalBank sql May 2 Drop

Topics: CAB & Smart Client Software Factory
May 3, 2006 at 12:52 AM
originally posted by: fballem

There appear to be errors in the GlobalBank.sql that is found in the May 2 Drop:

In the sp_FindCustomer procedure, the CustomerId column is invalid.
In the sp_LookupCustomer procedure, the @CustomerID variable is not declared. In that case, it's because the declaration of the variable is not surrounded by parenthesis.

I also understand that names for Stored Procedures are not to start with sp_, since this may conflict. This also slows down the procedures, since the System Procedures are searched if the Schema is not identified or is 'dbo'.

If someone could fix the sql file, validate that the build will work with the fix, and post a reply to this message, that would be much appreciated.

Thanks,

Flavelle
May 3, 2006 at 7:24 AM
originally posted by: austinlamb

I agree on the stored procs starting with 'sp' - last I knew, whenever a stored proc is called which starts with 'sp', first the master database is checked, and if the stored proc is not there, it goes to the database connected to. Whereas anything not starting with 'sp_' will default to checking in the databse connected to.

Read that on the blog of some guy from the SQL Server team, and he noted that because of this, naming stored procs with 'sp_' is not recommended, because it reduces performance due to these extra checks and fallbacks.