|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Friday, January 11, 2013 8:20 AM
Points: 1,608,
Visits: 373
|
|
kaspencer (2/22/2010) Good question. And it also raises a further point in my mind ... Is there a need to standardise numerical representation across every locale ?
I ask this because, in some locales, the number expressed as 700,000 could represent 700 [decimal point] 000 that is, 700 expressed to three decimal places. In other locales, it would be 700 [thousands separator] 000
I have noticed a mixture of decimal point indicators on invoices these days, and it certainly isn't unusual to get one using the comma [,] as a decimal point rather than the more logical full-stop [.].
Kenneth Spencer
You are right, in German the comma separates integral and decimal part, and the point separates the thousands. Makes both formatting and scanning numbers real fun. At least Windows helps, as it covers the problem in its Regional and Language Settings in the Control Panel, and most libraries take these settings into account. Currency signs, first day of the week, the sequence of day month and year in a standard date and other often neglected differences may become a pain in the ... as well.
Best regards, Dietmar Weickert.
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Wednesday, January 19, 2011 12:15 PM
Points: 33,
Visits: 40
|
|
| in Argentina (and all Hispanic countries, AFAIK) comma separates the integral and decimal part, and the point separates the thousands
|
|
|
|
|
Right there with Babe
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 8:03 AM
Points: 770,
Visits: 681
|
|
Fal (2/22/2010) ISNUMERIC is more general than CONVERT. The following is also valid (in 2008):
SET @PrincipalAmount = '100e2'
It will convert to float, but not money. With the QotD I was more concerned about the decimal place with no trailing zeroes.
S.
i found out the "e2" issue by accident. One of our customers likes using those in conjunction with numbers for locations ... WTH
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Today @ 3:58 AM
Points: 3,191,
Visits: 4,149
|
|
kaspencer (2/22/2010) Good question. And it also raises a further point in my mind ... Is there a need to standardise numerical representation across every locale ? Is there a need to standardize systems of measurement, alphabets, languages etc? This is what makes countries and cultures different from each other
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Yesterday @ 3:07 PM
Points: 7,096,
Visits: 7,156
|
|
A nice question.
It's pretty appalling that 8% of people chose the "error message" answer, though.
I'm much less surprised about the 17% who got it wrong to date by picking 0, as it seems (until you think about it properly) reasonable to assume that isNumeric is locale dependent and should return 0 in locales where the representation, with fraction and thousands seperators, of 700000 is '700.000,'. In fact it isn't locale dependent - whichever way round you use ',' and '.' it is acceptable to isNumeric in all locales - and also the conversion functions accept both notations instead of just the one applicable in the current locale and it wouldn't in fact be reasonable to do make it locale dependent. On the contrary it would be unreasonable and significantly reduce usability - for example people in the UK need to be able to process electronic invoices from UK, Ireland and the US and also from mainland Europe - so two diffent separator conventions have to be supported.
Tom Que conclure à la fin de tous mes longs propos? C'est que les préjugés sont la raison des sots. (Voltaire, 1756)
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Friday, November 09, 2012 2:48 PM
Points: 493,
Visits: 636
|
|
Good question. I ran up against an issue in data before where it was not actaully a valid numeric value, but passed the isnumeric test and broke the process upon insert. The only thing I would add beyond the difference in formating between countries is that you could just have some plain bad data like the following that would pass the isnumeric test
DECLARE @PrincipalAmount VARCHAR(15)SET @PrincipalAmount = '7,0,0,,,0.0,0,,,' SELECT ISNUMERIC(@PrincipalAmount)
Regards,
Toby
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Monday, March 04, 2013 4:10 AM
Points: 532,
Visits: 281
|
|
kaspencer (2/22/2010)
<snip> I have noticed a mixture of decimal point indicators on invoices these days, and it certainly isn't unusual to get one using the comma [,] as a decimal point rather than the more logical full-stop [.].
Kenneth Spencer
<devils advocate> Who's to say that the full-stop is more "logical"? Why not the colon or semicolon? Why not, indeed, the comma? </devils advocate>
(Living in the Netherlands, I see the comma as decimal separator all the time... )
Kelsey Thornton MBCS CITP
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Yesterday @ 10:36 AM
Points: 1,404,
Visits: 253
|
|
Ah, yes, maybe, Kelsey.
BUT if you are going to call it the "decimal point", then there is only only one punctuation symbol that resembles a point, and that is the full-stop. Surely?
Otherwise, then let's call it a decimal comma, a decimal exclamation mark, or even a decimal colon!
As for the thousands separator, the space is completely illogical, as, mechanistically, one doesn't know whether one is dealing with a list of numbers, or continuation of the previous number.
If ever there is a revolution, let's re-organise separators completely, as follows:
So that 100,678,830.56 could become 100T678T830D56.
Only joking!
Ken.
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Today @ 3:58 AM
Points: 3,191,
Visits: 4,149
|
|
kaspencer (3/2/2010) Otherwise, then let's call it a decimal comma Maybe you'll be surprised by the fact that the decimal separator IS called 'decimal comma' in many countries: http://en.wikipedia.org/wiki/Decimal_separator#Countries_using_Arabic_numerals_with_decimal_comma 
Here's a quote from Wikipedia:
The decimal separator or decimal point or decimal comma is a symbol used to mark the boundary between the integral and the fractional parts of a decimal number in a positional numeral system.
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Wednesday, January 19, 2011 12:15 PM
Points: 33,
Visits: 40
|
|
| we just call it "coma" :P
|
|
|
|