SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

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

Dvlpr2878
Starting Member

2 Posts

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

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?

visakh16
Very Important crosS Applying yaK Herder

India
52317 Posts

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

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

Dvlpr2878
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

Kristen
Test

United Kingdom
22403 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  
 New 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.08 seconds. Powered By: Snitz Forums 2000