Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Strange T-SQL behaviour using Hungarian collation Expand / Collapse
Author
Message
Posted Friday, December 19, 2003 3:35 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, July 28, 2006 1:54 AM
Points: 19, Visits: 1
This a nice one!
Has anyone ever deployed a SQL2000 or SQL7 database using a Hungarian collation(Hungarian_CI_AS)?
I've encountered some very strange behaviour in T-SQL statements, more specifically in stored procedures. It appears that (I swear, i'm not joking) every variable, table name or field name used in a sp containing the word 'year' (eg:FinancialYear, YearOfBirth...) suddenly becomes case sensitive?! If you, for instance write the following :

DECLARE @FinancialYear SMALLINT
...
SELECT @Financialyear = FinancialYear FROM Table1 --notice the spelling of the variable

Using the Hungarian collation Hungarian_CI_AS
this will fail reporting error : Must declare the variable '@Financialyear'.

The strange thing is that, all other variables, not containing the word 'year', appear not to have this problem, you can mix case however you want... no problem.

I have never heard of T-SQL being case sensitive.
I'm guessing that this is a bug.

Has anyone ever encountered such behaviour ?




Post #19439
Posted Monday, December 22, 2003 8:00 AM
SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Friday, May 18, 2007 3:36 PM
Points: 10,039, Visits: 1
No one has responded to this topic yet. Even if you don't have a complete answer, the original poster will appreciate any thoughts you have!
Post #92326
Posted Monday, December 22, 2003 9:04 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, July 31, 2014 6:13 AM
Points: 224, Visits: 135
I tried it on SQLServer 2000 SP3, but can not reproduce it.

Could it be that in your version SQLServer believes that in Hungarian Y is not the capital of y?




Post #92327
Posted Tuesday, December 23, 2003 7:34 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, July 28, 2006 1:54 AM
Points: 19, Visits: 1
Somehow I doubt that this is the case since other words containing capital Y don't show this behaviour. But thanks for trying. It really seems to be related to the word YEAR. Maybe because YEAR is also a function...blablabla... Bottom line is that it just doesn't make sense...




Post #92328
Posted Friday, August 26, 2011 10:14 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, September 4, 2014 8:26 AM
Points: 109, Visits: 490
The problem is not Y, but LY - Hungarian has a special LY letter: http://en.wikipedia.org/wiki/Hungarian_alphabet
Post #1166235
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse