Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 5 of 5 total |
LIKE underscore _ acting as a wildcard, how to escape it? |
Sat, Aug 6 2022 3:40 PM | Permanent Link |
Fady Geagea | Hello,
I've been querying for PREFIX_%, hoping to find all records that start with 'PREFIX_', and noticed that it also included records such as 'PREFIX2...', where the underscore turned out to be a wildcard. How should one proceed to search for an actual underscore character, using the LIKE operator? Thanks! |
Sun, Aug 7 2022 2:31 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Fady
Example from the manual SELECT * FROM customers WHERE Notes COLLATE ANSI_CI LIKE '%angry%' -- The following uses the LIKE operator's -- ESCAPE clause to perform a search on a -- phrase that includes the percent (%) -- character SELECT * FROM Orders WHERE AdjustmentNotes LIKE '20/%' ESCAPE '/' Roy Lambert |
Sun, Aug 7 2022 2:35 PM | Permanent Link |
Fady Geagea | Roy Lambert wrote:
Fady Example from the manual SELECT * FROM customers WHERE Notes COLLATE ANSI_CI LIKE '%angry%' -- The following uses the LIKE operator's -- ESCAPE clause to perform a search on a -- phrase that includes the percent (%) -- character SELECT * FROM Orders WHERE AdjustmentNotes LIKE '20/%' ESCAPE '/' Roy Lambert Hello Roy, thanks for your reply, it worked. Though I could not find this info in the SQL reference. Would you mind sharing the link of the doc where this info is available? Thanks! |
Mon, Aug 8 2022 12:36 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Fady
I looked it up in the pdf help file Roy Lambert |
Wed, Aug 10 2022 3:57 PM | Permanent Link |
Raul Team Elevate | On 8/7/2022 2:35 PM, Fady Geagea wrote:
> Hello Roy, > thanks for your reply, it worked. Though I could not find this info in the SQL reference. Would you mind sharing the link of the doc where this info is available? > it's under comparison operators in the SQL manual https://www.elevatesoft.com/manual?action=viewtopic&id=edb2sql&topic=Comparison_Operators Raul |
This web page was last updated on Tuesday, April 23, 2024 at 08:10 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |