Friday, March 9, 2012

Locale stuff

Hi,

You might just be able to save me downloading and installing SQL Server French...

I'm having localization problems with some .NET code - and I might be able to solve the problem if I know how SQL is parsed in different locales. Say my table MyTable contains a float column FloatColumn. In English, I would say
SELECT * FROM MyTable WHERE FloatColumn = 2.3

If my locale was, say for argument's sake, French, would I have to write
SELECT * FROM MyTable WHERE FloatColumn = 2,3
?

Thanks for your help,
TI prefer to dodge this bullet altogether, and make .NET do the work. Use a question mark in your query rather than a constant, and (if necessary) code the constant into your application. A bit messy, but it gets around the localization problems.

-PatP

No comments:

Post a Comment