Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Case sensitivity within stored procedure
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

2 Posts

Posted - 05/05/2010 :  17:11:40  Show Profile  Reply with Quote

I am working with a server with the collation set to SQL_Latin1_General_CP1_CS_AS . While creating an index on a new table in a new database, the SQL script was case sensitive (the table has a column iCustomer number and the script failed trying to index the column icustomer). I deleted the database and created a new database using SQL_Latin1_General_CP1_CI_AS as the collation and that script worked. Now however another script is attempting to create a stored procedure, however it is declaring a variable @iCustomer and attempts to use the variable as @icustomer and fails. The same scripts have worked on many (>20) SQL servers so I know the scripts work. This is the first SQL server with a collation other than SQL_Latin1_General_CP1_CI_AS. Any ideas?

Very Important crosS Applying yaK Herder

52326 Posts

Posted - 05/06/2010 :  13:07:55  Show Profile  Reply with Quote
is script overriding default collation of the db?

SQL Server MVP

Go to Top of Page

Starting Member

2 Posts

Posted - 05/07/2010 :  09:04:47  Show Profile  Reply with Quote
No. Do declared variables use the server's collation? That's the only thing I can think of since the database is case insensitive and the server is case sensitive
Go to Top of Page


United Kingdom
22859 Posts

Posted - 05/07/2010 :  09:32:56  Show Profile  Reply with Quote
" the server is case sensitive"

and presumably TEMPDB will be case sensitive too ... so any @TableVar or #TempTable you create you will need to eplicitly set the Collation on all Varchar/etc columns

Not come across that on variable names, but maybe something is doing something related in TEMPDB?
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000