Quantcast
Channel: SCN : Unanswered Discussions - Database
Viewing all articles
Browse latest Browse all 230

Possible problem with isnumeric function

$
0
0

If an integer is a number then why the following does not work:

declare @a char(1)

 

select @a="."

select convert(int, case when (isnumeric(@a)=1) then @a else "0" end)

 

 

 

While the follwoing works: 

declare @a char(1)

 

select @a="."

select convert(int, convert (numeric,case when (isnumeric(@a)=1) then @a else "0" end))

0

My question is: should isnumeric(".") return 1; as it does?


Viewing all articles
Browse latest Browse all 230

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>