Insert usual comment of "the more you add, the less 'Lite' it becomes"

Rather than changing LIKE, which would probably be bad, adding in something 
akin to Postgres's SIMILAR TO is a better idea.

https://www.postgresql.org/docs/10/static/functions-matching.html

I'd be of the opinion that going past that to full regular expression support 
is best left to extensions rather than the base SQLite.


SELECT * FROM SomeComments WHERE Comment IS SOMETHING ALONG THE LINES OF 
'Beginning%|%End';


-----Original Message-----
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On 
Behalf Of Stephen Chrzanowski
Sent: Thursday, May 10, 2018 1:28 PM
To: General Discussion of SQLite Database
Subject: [sqlite] OR statement in LIKE

I can't remember if I asked this before.  Went to google and didn't find an
answer.

Could there be a plan put in place that would including an "OR" mask
character?

The reason I ask is that I've got a user input field that searches the
required field in a database using % as the "AND" statement, but, I'd like
to expand to include using "OR" as well, but, not have to rely on my
software to regenerate a SQL statement with multiple [Field LIKE
'%UserInput%"] statements.

I'd expect the LIKE to work the same as the % mask works now, in that each
OR statement is queried against the position of that mask.  So

select * from SomeComments where Comment like 'Beginning%|%End'

would return results where the SomeComments field begins with "Beginning"
or ends with "End".
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to