Get all records that contain a number

Posted by Niladri.Biswas under Sql Server category on | Points: 40 | Views : 646
It is possible to write a query get all that record from a table where a certain field contains a numeric value?

something like "select street from tbladdress where street like '%0%' or street like '%1%' ect ect".

declare @t table(street varchar(50))
insert into @t
select 'this address is 45/5, Some Road' union all
select 'this address is only text'

select street from @t
where street like '%[0-9]%'

Comments or Responses

Login to post response