I need to select just the rows within a sql table which contain no numerical values whatsoever, here's an example table:
AddressLine1
-------------
59 Prospect Road
Rose House
24 St. Pauls Place
1 Oxford Avenue
9 Stonecross Road
65 Wood Common
19 Falcon Close
Thorn House
16 Poplars Close
52 Coombes Road
12 Brinsmead
14 Meadow Close
15 Rowlatt Drive
In this example I would just be looking for "Rose House" and "Thorn House" rows to be returned.
Any suggestion on the code I should be using would be gratefully received.
select * from tab
where AddressLine1 not like '%[0-9]%'
try this
I think the actual answer should be:
select * from tab where AddressLine1 like '%[^0-9]%'
According to: https://docs.microsoft.com/en-us/sql/t-sql/language-elements/like-transact-sql?view=sql-server-ver15
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With