Re: [sqlite] Searching for a percent symbol
Thank you also Petite Paul www.sandersonforensics.com skype: r3scue193 twitter: @sandersonforens Tel +44 (0)1326 572786 http://sandersonforensics.com/forum/content.php?195-SQLite-Forensic-Toolkit -Forensic Toolkit for SQLite email from a work address for a fully functional demo licence On 5 October 2016 at 11:00, Paul Sandersonwrote: > Brilliant thansks Dominique - I had completely misunderstood it :) > Paul > www.sandersonforensics.com > skype: r3scue193 > twitter: @sandersonforens > Tel +44 (0)1326 572786 > http://sandersonforensics.com/forum/content.php?195-SQLite-Forensic-Toolkit > -Forensic Toolkit for SQLite > email from a work address for a fully functional demo licence > > > On 5 October 2016 at 10:53, Dominique Devienne wrote: >> On Wed, Oct 5, 2016 at 11:50 AM, Paul Sanderson < >> sandersonforens...@gmail.com> wrote: >> >>> Thanks Petite - I have already looked at that - but how? >>> >> >> sqlite> create table t (v); >> sqlite> insert into t values >>...> ('I got 20 quid'), >>...> ('i got 20% of it'), >>...> ('i got just 20%'), >>...> ('some money'), >>...> ('this is an underscore _ ok'); >> sqlite> select * from t where v like '%20!% %' escape '!'; >> i got 20% of it >> sqlite> >> ___ >> 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
Re: [sqlite] Searching for a percent symbol
Brilliant thansks Dominique - I had completely misunderstood it :) Paul www.sandersonforensics.com skype: r3scue193 twitter: @sandersonforens Tel +44 (0)1326 572786 http://sandersonforensics.com/forum/content.php?195-SQLite-Forensic-Toolkit -Forensic Toolkit for SQLite email from a work address for a fully functional demo licence On 5 October 2016 at 10:53, Dominique Deviennewrote: > On Wed, Oct 5, 2016 at 11:50 AM, Paul Sanderson < > sandersonforens...@gmail.com> wrote: > >> Thanks Petite - I have already looked at that - but how? >> > > sqlite> create table t (v); > sqlite> insert into t values >...> ('I got 20 quid'), >...> ('i got 20% of it'), >...> ('i got just 20%'), >...> ('some money'), >...> ('this is an underscore _ ok'); > sqlite> select * from t where v like '%20!% %' escape '!'; > i got 20% of it > sqlite> > ___ > 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
Re: [sqlite] Searching for a percent symbol
> On Oct 5, 2016, at 11:50 AM, Paul Sanderson> wrote: > > How do I search for a % symbol within a string when % is a wild card > and I am escaping that very wildcard? For example: with DataSet as ( select 'I got 20 quid' as value union all select 'i got 20% of it' as value union all select 'i got just 20%' as value union all select 'some money' as value union all select 'this is an underscore _ ok' as value ) select value fromDataSet where value like '%\%%' escape '\’; i got 20% of it i got just 20% ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Searching for a percent symbol
On Wed, Oct 5, 2016 at 11:50 AM, Paul Sanderson < sandersonforens...@gmail.com> wrote: > Thanks Petite - I have already looked at that - but how? > sqlite> create table t (v); sqlite> insert into t values ...> ('I got 20 quid'), ...> ('i got 20% of it'), ...> ('i got just 20%'), ...> ('some money'), ...> ('this is an underscore _ ok'); sqlite> select * from t where v like '%20!% %' escape '!'; i got 20% of it sqlite> ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Searching for a percent symbol
Thanks Petite - I have already looked at that - but how? How do I search for a % symbol within a string when % is a wild card and I am escaping that very wildcard? Paul www.sandersonforensics.com skype: r3scue193 twitter: @sandersonforens Tel +44 (0)1326 572786 http://sandersonforensics.com/forum/content.php?195-SQLite-Forensic-Toolkit -Forensic Toolkit for SQLite email from a work address for a fully functional demo licence On 5 October 2016 at 10:44, Petite Abeillewrote: > >> On Oct 5, 2016, at 11:38 AM, Paul Sanderson >> wrote: >> >> How casn I find just the rows containing the percent symbol? is it possible? > > Use the ESCAPE clause: > > "If the optional ESCAPE clause is present, then the expression following the > ESCAPE keyword must evaluate to a string consisting of a single character. > This character may be used in the LIKE pattern to include literal percent or > underscore characters. The escape character followed by a percent symbol (%), > underscore (_), or a second instance of the escape character itself matches a > literal percent symbol, underscore, or a single escape character, > respectively.” > — The LIKE, GLOB, REGEXP, and MATCH operators > > https://www.sqlite.org/lang_expr.html > ___ > 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
Re: [sqlite] Searching for a percent symbol
> On Oct 5, 2016, at 11:38 AM, Paul Sanderson> wrote: > > How casn I find just the rows containing the percent symbol? is it possible? Use the ESCAPE clause: "If the optional ESCAPE clause is present, then the expression following the ESCAPE keyword must evaluate to a string consisting of a single character. This character may be used in the LIKE pattern to include literal percent or underscore characters. The escape character followed by a percent symbol (%), underscore (_), or a second instance of the escape character itself matches a literal percent symbol, underscore, or a single escape character, respectively.” — The LIKE, GLOB, REGEXP, and MATCH operators https://www.sqlite.org/lang_expr.html ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users