Hi all,
I've never noticed before, but sql 2005's IsNumeric() returns true for the \, $, . characters--and various other non-numeric (in my view) characters that happen to be used in numeric formatting.
So I'm wondering if there's a built-in sql server function that returns true if the value of a field is truly numeric. I have a statement that just started blowing up because it happened to get some fields with a lone $ sign or slash. I thought I was protected using the IsNumeric but no, and these lone characters just started popping up in the data.
I know I could build one, but one would think this would be a no-brainer for an internal function. I'm also surprised I've never noticed this behaviour before.
Anyway, does this exist, or is this something where people write their own?
Thanks,
--Jim
I've never noticed before, but sql 2005's IsNumeric() returns true for the \, $, . characters--and various other non-numeric (in my view) characters that happen to be used in numeric formatting.
So I'm wondering if there's a built-in sql server function that returns true if the value of a field is truly numeric. I have a statement that just started blowing up because it happened to get some fields with a lone $ sign or slash. I thought I was protected using the IsNumeric but no, and these lone characters just started popping up in the data.
I know I could build one, but one would think this would be a no-brainer for an internal function. I'm also surprised I've never noticed this behaviour before.
Anyway, does this exist, or is this something where people write their own?
Thanks,
--Jim