Can I write a query to get this whole record from a table, where does a specific field contain a numerical value?
something like "select a street from tbladdress where a street is like"% 0% "or a street like"% 1% "etc."
only then with one function?
try it
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]%'
Street
this address is 45/5, Some Road
Yes, but it will be inefficient and probably slow, with a wildcard at the front edge of the template
LIKE '%[0-9]%'
( , , ).
, , - ( ) ( ), , hasNumerics , , insert/update , .
hasNumerics
, , , , . , , select.
select
, , :
select * from mytable where hasNumerics = 1; -- or true or ...
, like '%...%' .
like '%...%'
I found this solution "select a street from tbladresse with (nolock), where patindex ('% [0-9]%', street) = 1"
it took me 2 minutes to find 3 million on an unindexed field
To get strings containing only numbers, use this query
select street from tbladdress where upper(street) = lower(street)
Works in oracle.
Source: https://habr.com/ru/post/1724082/More articles:C # Winforms DataGridView Time Column - c #Open file instead of saving file in Silverlight SaveFileDialog - fileHow to determine the "narrowest" font in Windows? - user-interfaceiPhone + UITableView + specific row access cell - iphoneIs object overlay also inherited? - javaEmacs, Zen Encoding Mode and Putty - emacsHow to get the last created table in MySQL? - mysqlCapture downloads to large files - asp.netМожно ли скачать pdf файл через чистый html? - htmlSnow Leopard application not appearing on Leopard - xcodeAll Articles