views:

496

answers:

1

Hello, I have a case sensitive SERVER (SQL_Latin1_General_CP1_CS_AS) but the Database is Case insensitive (SQL_Latin1_General_CP1_CI_AS).

If I try to create the following stored procedure on the database, I get the error "Must declare the scalar variable "@test"."

CREATE PROCEDURE [dbo].[sp_Test] (@TEST int) as
begin   
    SELECT @test
end
GO

But as I stated the database itself is not case sensitive. Im assuming this is documented somewhere that stored procedures follow the sensitivity of the server but I cannot find a reference anywhere. Can anyone point me to where I would find some docs about this? (Yes I tried google, but im not finding anything)

+1  A: 

You are right. Database collation do not control variables name case sensitivity. Server collation do. Any other object (tables, fields, etc.) names are case insensitive in described configuration.

I didn't found the documentation for that, but maybe this will help you

http://social.msdn.microsoft.com/Forums/en-US/vstsdb/thread/0d833fab-2b32-4b98-a3ab-cdf8c743e5e0

martin.malek
Thank you for the confirmation.
Zenox