Questions tagged [string-searching]
For questions about searching a string for matches
11
questions
137
votes
8
answers
218k
views
Pattern matching with LIKE, SIMILAR TO or regular expressions in PostgreSQL
I had to write a simple query where I go looking for people's name that start with a B or a D :
SELECT s.name
FROM spelers s
WHERE s.name LIKE 'B%' OR s.name LIKE 'D%'
ORDER BY 1
I was wondering ...
20
votes
3
answers
3k
views
What is it called when you search the middle of a string instead of the beginning?
I am trying to polish up my vocabulary to better communicate with my fellow developers. We have several places in the site where we are debating if we should search for a string from the beginning '...
4
votes
1
answer
346
views
Find records with same string with extra character
OK, so I have a Microsoft SQL Server 2014 database table called owner with around 90,000 records with owner information, another called vehicle with vehicle information
Owner_Name ...
0
votes
1
answer
2k
views
why my split string functions are not working with large OBJECT_DEFINITION?
I have in one of my databases a stored procedure
called PROCEDURE [repl].[usp_upd_repl_out_application], that is not exactly a very clever stored procedure but it has over 389 lines.
As I need to ...
13
votes
4
answers
63k
views
Find if any of the rows partially match a string
I want to see if a table contains any sub-string of a given string.
Let's say I have a string
somedomain.com
In database I have:
blabladomain.com
testdomain.com
domain.com
I need to make a ...
13
votes
7
answers
61k
views
How to find all positions of a string within another string
How can I find all the positions with patindex in a table or variable?
declare @name nvarchar(max)
set @name ='ali reza dar yek shabe barani ba yek '
+ 'dokhtare khoshkel be disco raft va ali ...
5
votes
1
answer
164
views
Match .csv values as INTs. If one value from a group in the .csv matches one in another group, then merge strings
Here we have two sets of numbers. The problem is that I can't figure out how to get from the input to the output of numbers (DDL and DML below and also in the fiddle here).
current_data
1,2,3
1,4
1,5,...
2
votes
1
answer
3k
views
Search entire database(210 tables) for a unique Id (PK) and get the table name
Rewritten Question:
I need to look through an entire database, 210 tables for a unique ID that is a number.
I have limited access to my database through things called nodes (Visual programming.)
...
2
votes
1
answer
2k
views
Search on concatenate columns
I have this :
CREATE TABLE users
(
first_name varchar(60) NOT NULL,
last_name varchar(60) NOT NULL
);
INSERT INTO users
(first_name, last_name)
VALUES
('Sylvia ', 'Hoeks'),
('...
2
votes
2
answers
3k
views
Return results that contain or do not contain punctuation
Is there a way within MySQL to return results using a LIKE statement that contain or do not contain punctuation characters such as apostrophes and hyphens?
For example if I have one of the following ...
2
votes
3
answers
3k
views
Using fulltext search to find a sequence of digits
We have a column of ten digit numbers (with leading zeros). We are trying to find rows that have a specific sequence of digits.
For example, all rows containing "5088" in any place in the column.
...