Doing some maintenance on an old report created by someone long ago. I notice data source for the report is a stored procedure. The sproc call looks like this:
EXEC someStoredProc;1
I've never seen the ";1" before. Just curious what the heck it is? Can't find any documentation online. If I switch the "1" to any other number, SQL throws error "cannot find stored procedure 'someStoredProc'". But switch it back to "1" and it works. Doesn't seem to have any impact on output. What is this thing?
I noticed I can put ";1" after any stored procedure and it executes seemingly the same as without it.
If anyone can clear up this mystery for me - thank you!
These are known as Numbered Procedures, which have been deprecated since 2005 (but are still somewhat supported through SQL Server 2012
)
In SQL Server, you can create different versions of the stored procedure with a ;#
suffix. These can generally be used to overload a stored procedure, by creating another version that accepts a different number of parameters, or behaves differently, etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With