Skip to main content
-1 votes
0 answers
98 views

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?)
J.J. Beam's user avatar
  • 3,193
1990 votes
47 answers
1.9m views

I want to query something with SQL's like query: SELECT * FROM users WHERE name LIKE '%m%' How can I achieve the same in MongoDB? I can't find an operator for like in the documentation.
Freewind's user avatar
  • 199k
628 votes
17 answers
627k views

Is there any way to write case-insensitive queries in PostgreSQL, E.g. I want that following 3 queries return same result. SELECT id FROM groups where name='administrator' SELECT id FROM groups ...
Jame's user avatar
  • 22.4k
460 votes
16 answers
625k views

I looked around some and didn't find what I was after so here goes. SELECT * FROM trees WHERE trees.`title` LIKE '%elm%' This works fine, but not if the tree is named Elm or ELM etc... How do I ...
David Morrow's user avatar
  • 9,434
414 votes
15 answers
465k views

I have a procedure in SQL that I am trying to turn into Linq: SELECT O.Id, O.Name as Organization FROM Organizations O JOIN OrganizationsHierarchy OH ON O.Id=OH.OrganizationsId where OH.Hierarchy ...
Matt Dell's user avatar
  • 9,609
375 votes
16 answers
452k views

When using SQL, are there any benefits of using = in a WHERE clause instead of LIKE? Without any special operators, LIKE and = are the same, right?
Travis's user avatar
  • 12.4k
337 votes
11 answers
249k views

I am trying to filter items with a stored procedure using like. The column is a varchar(15). The items I am trying to filter have square brackets in the name. For example: WC[R]S123456. If I do a ...
Travis's user avatar
  • 3,789
425 votes
5 answers
1.4m views

Is it possible to combine LIKE and IN in a SQL Server-Query? So, that this query SELECT * FROM table WHERE column LIKE IN ('Text%', 'Link%', 'Hello%', '%World%') Finds any of these possible matches: ...
F.P's user avatar
  • 18k
214 votes
9 answers
577k views

I have the following data in a Table PriceOrderShipped PriceOrderShippedInbound PriceOrderShippedOutbound In SQL I need to write a query which searches for a string in a table. While searching for a ...
shockwave's user avatar
  • 3,352
211 votes
9 answers
458k views

I have this MySQL query. I have database fields with this contents sports,shopping,pool,pc,games shopping,pool,pc,games sports,pub,swimming, pool, pc, games Why does this like query does not ...
webmasters's user avatar
  • 5,869
0 votes
1 answer
128 views

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 ...
Fletch's user avatar
  • 377
275 votes
7 answers
404k views

The default behaviour of LIKE and the other comparison operators, = etc is case-sensitive. Is it possible make them case-insensitive?
sergionni's user avatar
  • 13.6k
170 votes
8 answers
182k views

I have been seeing quite a large variation in response times regarding LIKE queries to a particular table in my database. Sometimes I will get results within 200-400 ms (very acceptable) but other ...
Jason's user avatar
  • 2,469
115 votes
16 answers
346k views

Is there any way to compare strings in a C# LINQ expression similar to SQL's LIKE operator? Suppose I have a string list. On this list I want to search a string. In SQL, I could write: SELECT * FROM ...
shamim's user avatar
  • 6,788
106 votes
11 answers
154k views

I am trying to write a JPQL query with a like clause: LIKE '%:code%' I would like to have code=4 and find 455 554 646 ... I cannot pass :code = '%value%' namedQuery.setParameter("%" + this.value + "%...
user avatar

15 30 50 per page
1
2 3 4 5
218