SQL Detecting if only integers in varchar -


this question has answer here:

i'm hoping there basic string function haven't found yet.

specifically scenarios length of string unknown: there succinct method of telling if string variable contains [0-9] values?

for example, following method works require additional mention of possible characters appear other numerals.

select var  #table1  var not '%[a-z]%' 

and

select var  #table1  var '[0-9][0-9][0-9][0-9][0-9]...' 

doesn't work because length of var required filter.

thanks in advance

select var #table1  var not '%[^0-9]%'  

Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -