Re: [sqlite] Question about a query

2018-10-09 Thread James K. Lowden
On Tue, 9 Oct 2018 10:22:12 -0700 Jens Alfke wrote: > You could implement a custom query function to do this (custom > functions are quite simple, and there are examples online). http://www.schemamania.org/sql/sqlite/udf/ Been there, done that. :-) --jkl

Re: [sqlite] Question about a query

2018-10-09 Thread Jens Alfke
> On Oct 9, 2018, at 6:47 AM, Leonardo Inácio de Freitas > wrote: > > Using SQLite, can you use masks (or regex) (like '% str%') inside > instr / substr, to delimit the output of a select, instead of me > determining the beginning and end of the substring? You could implement a custom query

Re: [sqlite] Question about a query

2018-10-09 Thread Brian Curley
well... It's not quite that categorical "no", although Simon's more than correct. There's extensions that allow for regexp(), such as you might find in SQLite Studio that allow for some really handy cross-functionality when paired with group_concat(), for example. (It's addictive to have it

Re: [sqlite] Question about a query

2018-10-09 Thread Simon Slavin
On 9 Oct 2018, at 2:47pm, Leonardo Inácio de Freitas wrote: > Using SQLite, can you use masks (or regex) (like '% str%') inside > instr / substr, to delimit the output of a select, instead of me > determining the beginning and end of the substring? No. Sorry. You have to use string core

[sqlite] Question about a query

2018-10-09 Thread Leonardo Inácio de Freitas
Hello! Using SQLite, can you use masks (or regex) (like '% str%') inside instr / substr, to delimit the output of a select, instead of me determining the beginning and end of the substring? What I need (example): SELECT (substr (my_field, like% abc, until_next_spacechar_after (like% abc))) from

Re: [sqlite] Question about expected query result??

2004-05-14 Thread Brass Tilde
> > On MS SQL Server 2000, one can pass a field name to the COUNT function, and > > though I haven't yet seen any difference in the results between the two, the > > queries run faster with COUNT() than with COUNT(*). > > COUNT(fieldname) provides the count of rows where the data in 'fieldname' is

[sqlite] Question about expected query result??

2004-05-13 Thread Shawn Anderson
I have the following table/data ClientIPClientDomain 63.149.28.33mail.serverlocation.com 63.149.28.33mail.serverlocation.com 63.149.28.33mail.serverlocation.com 63.149.28.33mail.serverlocation.com 211.141.67.7xmailserver.org 211.141.67.7xmailserver.org