3,268 questions
-1
votes
0
answers
98
views
Which index is useful on like clause? [duplicate]
SELECT o
FROM Order o
WHERE o.customerEmail LIKE %:emailPart%
are there any RDBMS (PostgreSQL) index type which can improve performance of the query above? (i.e. which index can help on like clause?)
0
votes
1
answer
128
views
Use of Pipe (Vertical bar) in SQL LIKE operator statements
I am looking to combine the following two LIKE string comparisons into one LIKE string comparison:
SELECT *
FROM dbo.Departments D
WHERE D.SystemKey LIKE 'SCI%'
OR D.SystemKey LIKE 'FOO%';
I have ...
0
votes
0
answers
44
views
i want to know how i search words or pieces of words in firebase in flutter, like i user comando "like" in mysql? [duplicate]
consider:
CollectionReference _dbCollection = FirebaseFirestore.instance.collection('estoque');
await _dbCollection.orderBy("descricao").startAt([_itemPesquisaController.text]).endAt(['${...
0
votes
1
answer
50
views
Mysql search with LIKE operator several words [duplicate]
I have a database structure like below
users
id | name
1 | Elizabeth Smith
2 | Smith Elizabeth
3 | Elizabeth Smith // extra space in between two words
4 | Dr.Elizabeth Smith
5 ...
0
votes
3
answers
60
views
How to combine LEFT and LOWER in a multicolumn index for leading text patterns?
I create an index this way:
CREATE INDEX rep_tval_idx ON public.rep USING btree (t, lower(left(val, 127)));
Then I run a SELECT with matching filter:
explain
select * from rep
where t=3 and lower(...
0
votes
1
answer
98
views
Find Invalid Chars in a Column [duplicate]
I am moving data from one system to another. The new system has a requirement that one of the columns can "ONLY have letters, numbers, hyphens and underscores". I need to find a way to see ...
0
votes
1
answer
61
views
Find procedure name in all other procedures
procedure 1:
create or replace procedure pro_1()
as
$$
begin
raise info 'pro1';
end
$$
language plpgsql;
procedure 2:
create or replace procedure pro_2()
as
$$
begin
raise info 'pro.1'...
2
votes
1
answer
64
views
MYSQL is very slow when combing LIKE with EQUALS or IN, but not other OR operators [duplicate]
SELECT
products.*,
products_description.*
FROM
products
LEFT JOIN products_description ON products_description.products_id = products.products_id
LEFT JOIN products_rooms ON ...
0
votes
0
answers
137
views
Inner Join using Like Operator in Big Query
I have a list of c.11k strings that I need to partially match to string IDs within a BigQ table.
T1 is the original BQ table and T2 is a table with a column of the 11,000 strings
At the minute I have ...
0
votes
2
answers
129
views
SQL like query contains only a specific character
I'm trying to get records from SQL server starting with abc_ followed by at least one letter (a-z, A-Z) and then continue to the end with just letters and numbers (a-z, A-Z, 0-9). No special ...
0
votes
1
answer
142
views
SQL SELECT * FROM table WHERE column NOT LIKE '%str% '
I have a SQL table where the last column is named flag:
name: type: collation: null: default:
...
flag varchar(250) utf8mb4_0900_ai_ci yes NULL
The data has either double ...
0
votes
0
answers
78
views
How to use NOT LIKE in SQL with a string of words
I am having trouble excluding text in a field that starts with "Community Launch". I am using the code:
rp.project_name NOT LIKE 'Community Launch%'
but this is removing any text that also ...
0
votes
1
answer
199
views
MySQL(5.7.26) query optimization, why select * is much faster that select id in my leading wildcard query?
I have a leading wildcard query I know it is hard to optimize. I know if I use only the trailing wildcard I can do some optimization. But our client wants the leading wildcard because when searching ...
0
votes
1
answer
87
views
How to combine Sequel.or with Sequel.like? (mssql or sqlite)
I use ruby and sequel in my programm.
I want to execute a deletion in my DB like
DELETE FROM db.tbl WHERE col1 = 'a' and (col2 LIKE '%xxx%' OR col2 LIKE '%yyy%')
But I fail to build the statement ...
4
votes
2
answers
948
views
MariaDB LIKE with Escape Character - Unexpected Behavior
I'm working on a Laravel application with a jobs table containing job data in the payload column. The payload is a JSON string similar to this:
{"displayName":"App\\Jobs\\V1\\...