Strange T-SQL behaviour using Hungarian collation

  • 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 ?

  • This was removed by the editor as SPAM

  • 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?

  • 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...

  • The problem is not Y, but LY - Hungarian has a special LY letter: http://en.wikipedia.org/wiki/Hungarian_alphabet

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply