Re: [sqlite] how to search for asterix character?
Glob works fine as well with the [*] and is still case-sensitive and that is how it is intended. So this works fine: select field1 from table1 where field1 glob '*FH*[*]' RBS On Wed, May 26, 2010 at 8:22 PM, Olaf Schmidtwrote: > > "Bart Smissaert" > schrieb im Newsbeitrag > news:aanlktikivzcbz81hqs28dtptoy8h6hc6nbukesmth...@mail.gmail.com... > >> > "...Where SomeColumnContent Like '%someother[*]part%' >> >> Thanks Olaf, that works fine. >> As my customers won't get this I think I might let my >> code take care of this. > Perhaps a good idea. ;-) > >> How would it work with glob? > Umm, not a glob expert don't use it here (yet). > my first thought would be, to precede the char in question > with an escape-char (as the backslash)... testing... > > No, it apparently works in the same way as my overridden > like per: > "...Where SomeColumnContent glob '*someother[*]part*' > > But possibly not case-insensitive (not tested, that) - > and not "unicode-aware" of course. > > > Olaf > > > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] how to search for asterix character?
"Bart Smissaert"schrieb im Newsbeitrag news:aanlktikivzcbz81hqs28dtptoy8h6hc6nbukesmth...@mail.gmail.com... > > "...Where SomeColumnContent Like '%someother[*]part%' > > Thanks Olaf, that works fine. > As my customers won't get this I think I might let my > code take care of this. Perhaps a good idea. ;-) > How would it work with glob? Umm, not a glob expert don't use it here (yet). my first thought would be, to precede the char in question with an escape-char (as the backslash)... testing... No, it apparently works in the same way as my overridden like per: "...Where SomeColumnContent glob '*someother[*]part*' But possibly not case-insensitive (not tested, that) - and not "unicode-aware" of course. Olaf ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] how to search for asterix character?
>I use vb or in SQLlite Expert the * does not seem to work > >From my testing * doesn't seem to work in the likeif I use '%33' it > returns >everything with test33if I use '33%' it returns everything with >33testif I >use '%33%' it returns everything with 33test, test33 which is the same as >* I can't vouch for VB, but SQLite Expert --which I use extensively-- definitely handles asterisks '*' in litterals correctly. What do you mean with "which is the same as *". Asterisk has no special meaning for LIKE. You must be confusing with GLOB. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] how to search for asterix character?
> "...Where SomeColumnContent Like '%someother[*]part%' Thanks Olaf, that works fine. As my customers won't get this I think I might let my code take care of this. How would it work with glob? RBS On Wed, May 26, 2010 at 7:05 PM, Olaf Schmidtwrote: > > "Bart Smissaert" > schrieb im Newsbeitrag > news:aanlktil5lha-3-l6x8umwv8e3pyrda6h0ln3dcoyh...@mail.gmail.com... > >> Yes, it must be either my code or the wrapper to blame. >> Thanks for confirming. > > It's a wrapper-"problem", but a perhaps a coding problem > as well... ;-) > > The wrapper overrides sqlites internal Like-Function, > to achieve (Unicode-)BSTR mapping. > > Internally VBs normal Like-Function then does "all the rest". > > The wrapper (due to compatibility reasons with regards > to JET *.mdbs) also understands their older "like-syntax": > "...Where SomeColumnContent Like '*somepart*' > (in this regards behaving somewhat similar to SQLites glob, > which BTW was _not_ overriden)... > > But it supports the "default-like-syntax" as well: > "...Where SomeColumnContent Like '%somepart%' > > To specify single chars, which are equal to the "comparison- > descriptors" you have to "escape them" within brackets: > "...Where SomeColumnContent Like '%someother[*]part%' > > If the above should not work, then this would be considered > a "real wrapper-bug". ;-) > > > HTH > > Olaf Schmidt > > > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] how to search for asterix character?
"Bart Smissaert"schrieb im Newsbeitrag news:aanlktil5lha-3-l6x8umwv8e3pyrda6h0ln3dcoyh...@mail.gmail.com... > Yes, it must be either my code or the wrapper to blame. > Thanks for confirming. It's a wrapper-"problem", but a perhaps a coding problem as well... ;-) The wrapper overrides sqlites internal Like-Function, to achieve (Unicode-)BSTR mapping. Internally VBs normal Like-Function then does "all the rest". The wrapper (due to compatibility reasons with regards to JET *.mdbs) also understands their older "like-syntax": "...Where SomeColumnContent Like '*somepart*' (in this regards behaving somewhat similar to SQLites glob, which BTW was _not_ overriden)... But it supports the "default-like-syntax" as well: "...Where SomeColumnContent Like '%somepart%' To specify single chars, which are equal to the "comparison- descriptors" you have to "escape them" within brackets: "...Where SomeColumnContent Like '%someother[*]part%' If the above should not work, then this would be considered a "real wrapper-bug". ;-) HTH Olaf Schmidt ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] how to search for asterix character?
Yes, it must be either my code or the wrapper to blame. Thanks for confirming. RBS On Wed, May 26, 2010 at 6:18 PM, Black, Michael (IS) <michael.bla...@ngc.com> wrote: > This works for me: > > sqlite> create table t(t varchar); > sqlite> insert into t values('Testing*with asterisk'); > sqlite> insert into t values('Testing without asterisk'); > sqlite> select * from t; > Testing*with asterisk > Testing without asterisk > sqlite> select * from t where t like '%*%'; > Testing*with asterisk > > Michael D. Black > Senior Scientist > Northrop Grumman Mission Systems > > > > > From: sqlite-users-boun...@sqlite.org on behalf of ro...@zhole.com > Sent: Wed 5/26/2010 12:14 PM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] how to search for asterix character? > > > > I use vb or in SQLlite Expert the * does not seem to work > From my testing * doesn't seem to work in the likeif I use '%33' it returns > everything with test33if I use '33%' it returns everything with 33testif I > use '%33%' it returns everything with 33test, test33 which is the same as > * > Hope this helpsRoger > > > From: "Jean-Christophe Deschamps" <j...@q-e-d.org> > Sent: Wednesday, May 26, 2010 12:54 PM > To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org> > Subject: Re: [sqlite] how to search for asterix character? > >>How do I search for the asterix character * ?? >> >>This doesn't work: >>select field1 from table1 where field1 like '%FH%*%' >>as the * character here seems to be ignored. >> >>Using the latest version of SQLite. > > You're doing it right. Either you use a wrapper that messes with * in > litterals or there is actually no matching row. Try using the > command-line tool to better diagnose what's going on here. > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] how to search for asterix character?
> I use vb What wrapper is that? RBS On Wed, May 26, 2010 at 6:14 PM, ro...@zhole.com <ro...@zhole.com> wrote: > I use vb or in SQLlite Expert the * does not seem to work > From my testing * doesn't seem to work in the likeif I use '%33' it returns > everything with test33if I use '33%' it returns everything with 33testif I > use '%33%' it returns everything with 33test, test33 which is the same as > * > Hope this helpsRoger > > > From: "Jean-Christophe Deschamps" <j...@q-e-d.org> > Sent: Wednesday, May 26, 2010 12:54 PM > To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org> > Subject: Re: [sqlite] how to search for asterix character? > >>How do I search for the asterix character * ?? >> >>This doesn't work: >>select field1 from table1 where field1 like '%FH%*%' >>as the * character here seems to be ignored. >> >>Using the latest version of SQLite. > > You're doing it right. Either you use a wrapper that messes with * in > litterals or there is actually no matching row. Try using the > command-line tool to better diagnose what's going on here. > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] how to search for asterix character?
This works for me: sqlite> create table t(t varchar); sqlite> insert into t values('Testing*with asterisk'); sqlite> insert into t values('Testing without asterisk'); sqlite> select * from t; Testing*with asterisk Testing without asterisk sqlite> select * from t where t like '%*%'; Testing*with asterisk Michael D. Black Senior Scientist Northrop Grumman Mission Systems From: sqlite-users-boun...@sqlite.org on behalf of ro...@zhole.com Sent: Wed 5/26/2010 12:14 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] how to search for asterix character? I use vb or in SQLlite Expert the * does not seem to work >From my testing * doesn't seem to work in the likeif I use '%33' it returns everything with test33if I use '33%' it returns everything with 33testif I use '%33%' it returns everything with 33test, test33 which is the same as * Hope this helpsRoger From: "Jean-Christophe Deschamps" <j...@q-e-d.org> Sent: Wednesday, May 26, 2010 12:54 PM To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org> Subject: Re: [sqlite] how to search for asterix character? >How do I search for the asterix character * ?? > >This doesn't work: >select field1 from table1 where field1 like '%FH%*%' >as the * character here seems to be ignored. > >Using the latest version of SQLite. You're doing it right. Either you use a wrapper that messes with * in litterals or there is actually no matching row. Try using the command-line tool to better diagnose what's going on here. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] how to search for asterix character?
I use vb or in SQLlite Expert the * does not seem to work >From my testing * doesn't seem to work in the likeif I use '%33' it returns everything with test33if I use '33%' it returns everything with 33testif I use '%33%' it returns everything with 33test, test33 which is the same as * Hope this helpsRoger From: "Jean-Christophe Deschamps" <j...@q-e-d.org> Sent: Wednesday, May 26, 2010 12:54 PM To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org> Subject: Re: [sqlite] how to search for asterix character? >How do I search for the asterix character * ?? > >This doesn't work: >select field1 from table1 where field1 like '%FH%*%' >as the * character here seems to be ignored. > >Using the latest version of SQLite. You're doing it right. Either you use a wrapper that messes with * in litterals or there is actually no matching row. Try using the command-line tool to better diagnose what's going on here. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] how to search for asterix character?
Yes, thanks, it looks it might indeed be the (VB) wrapper that is to blame here. Will contact the developer. RBS On Wed, May 26, 2010 at 5:53 PM, Jean-Christophe Deschampswrote: > >>How do I search for the asterix character * ?? >> >>This doesn't work: >>select field1 from table1 where field1 like '%FH%*%' >>as the * character here seems to be ignored. >> >>Using the latest version of SQLite. > > You're doing it right. Either you use a wrapper that messes with * in > litterals or there is actually no matching row. Try using the > command-line tool to better diagnose what's going on here. > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] how to search for asterix character?
>How do I search for the asterix character * ?? > >This doesn't work: >select field1 from table1 where field1 like '%FH%*%' >as the * character here seems to be ignored. > >Using the latest version of SQLite. You're doing it right. Either you use a wrapper that messes with * in litterals or there is actually no matching row. Try using the command-line tool to better diagnose what's going on here. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] how to search for asterix character?
How do I search for the asterix character * ?? This doesn't work: select field1 from table1 where field1 like '%FH%*%' as the * character here seems to be ignored. Using the latest version of SQLite. RBS ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users