Skip to main content

Questions tagged [string-searching]

For questions about searching a string for matches

4 votes
1 answer
134 views

(Using SQL Server 2019 CU 31) Why does only the CASE expression against @nvarchar_dash_after_ranges return 'LIKE' in this query? Note that the same comparison against a VARCHAR expression returns '...
Bryan Rebok's user avatar
  • 1,219
-2 votes
3 answers
313 views

I know the values in a column are 'active', 'cancelled',' complete'. How can I write a query to find the name of every table and column containing these values? It is a huge SQL Server database with ...
Alan's user avatar
  • 1
0 votes
0 answers
38 views

My SQLite database for full-text search contains book contents. Each book is stored as a single document in the FTS table. At most one result is returned per book even though there are multiple ...
ma3x's user avatar
  • 13
0 votes
1 answer
142 views

I have the following query; SELECT `e`.`entity_id` FROM `catalog_category_entity` AS `e` LEFT JOIN `catalog_category_entity_varchar` AS `at_url_path_default` ON (`at_url_path_default`.`row_id` = `e`.`...
Marisa's user avatar
  • 23
4 votes
3 answers
1k views

I have a query that does a like statement on a column that stores fullpath locations of files on a computer. Example select * from table where fullpath like '%hi.exe' Which never seems to use an ...
Steven M's user avatar
2 votes
1 answer
74 views

I'm trying to create a search which searches a field for a longest matches possible and then stop. Here's the basic idea in Python for single match: import re def generate(txt: str) -> list: s =...
raspi's user avatar
  • 131
0 votes
0 answers
392 views

With SQL, I need to select rows which have a pattern like %hello% (i.e. <anything>hello<anything>) in a column, with potentially 100 millions of rows or more. In the answer Infix search in ...
Basj's user avatar
  • 171
2 votes
3 answers
1k views

Context I have a table named companies_establishments that holds ~33M rows. I created a GIN index with trigrams, so I can make LIKE queries much faster. CREATE INDEX companies_establishments_id_index ...
Madeorsk's user avatar
  • 123
0 votes
2 answers
200 views

So in essence what im trying to do is this: Given TBL1 (around 8,000 rows) letters abababa bcbcbcb cdcdcdc and TBL2 (around 2,000 rows) letters ab bc I want to write a query to find every row in TBL1 ...
Shahzad Ansari's user avatar
0 votes
2 answers
491 views

In sqlite I have the following table CREATE table IF NOT EXISTS redirect ( id INTEGER PRIMARY KEY AUTOINCREMENT, url_from TEXT not null, url_to TEXT not null, ...
Dimitrios Desyllas's user avatar
5 votes
1 answer
1k views

Postgres 13 I am looking for a way to search UTF-8 text that may have variant character representations ( what is the proper term for this? ie 𝐋𝐈𝐅𝐄 vs life ) within postgresql. I am running into ...
unomi's user avatar
  • 153
1 vote
1 answer
1k views

I have an issue where I keep getting the value 'CtP_PETER_Fact' out of the query below. It should be a case sensitive where-clause. I tried it in a few different ways: setting the COLLATE statement ...
Niels Broertjes's user avatar
0 votes
1 answer
433 views

I have a column with strings containing a list of species: +----------------------------------------+ | species | +----------------------------------------+ | Dinosauria,...
Lisdengard's user avatar
1 vote
0 answers
678 views

I have the following query for my PostgreSQL 13 database: SELECT * FROM "user" INNER JOIN "comment" on "comment"."user_id" = "user"."id" ...
Kamal Karain's user avatar
2 votes
0 answers
247 views

I am looking at tables like this (I did not design them): CREATE TABLE EventIDsToSearch (id int not null) insert into EventIDsToSearch values (1) insert into EventIDsToSearch values (92) insert into ...
w0051977's user avatar
  • 513

15 30 50 per page
1
2 3 4 5 6