Re: [sqlite] Help forming query

2014-06-17 Thread David M. Cotter
also: if this query isn't *very* fast, then i'm fine with just "give me the value of the first cell where there is data in that column" in the below case, i'd get a "1". i would then proceed to delete everything with a "1" in it (from this and other tables) then i'd ask again, this time i'd ge

[sqlite] Help forming query

2014-06-17 Thread David M. Cotter
i have a table with a numeric column (not the key column) i want to obtain from this table a list of unique numbers appearing in that one column some cells in the column may have nothing, some may have duplicate numbers eg: > 1 > 1 > 1 > 4 > _ > _ > 4 > _ note that "_" means "no data". i want

Re: [sqlite] Proximity ranking with FTS

2014-06-17 Thread Josh Wilson
Let's say I have search phrase "TermA TermB" matchinfo option 'p' would be 2. CREATE VIRTUAL TABLE t1 USING fts4(title, content); matchinfo option 'c' returns 2 for the number of columns. Now consider sample data: |1|""|"TermA"| |2|"TermA TermB"|"TermA TermA"| |3|"TermA TermA TermA"|"TermB"|

Re: [sqlite] Proximity ranking with FTS

2014-06-17 Thread Stadin, Benjamin
This info is however not provided to an extension function. It would be great if the token number ¹t¹ could be added. Ben Am 17.06.14 19:36 schrieb "Dan Kennedy" unter : >On 06/17/2014 10:48 AM, Josh Wilson wrote: >> Yeah I had thought about using the byte distance between words but you >>get >>

Re: [sqlite] Proximity ranking with FTS

2014-06-17 Thread Dan Kennedy
On 06/17/2014 10:48 AM, Josh Wilson wrote: Yeah I had thought about using the byte distance between words but you get these instances: [Example A] |word1|10charword|word2| [Example B] |word1|3charword|4charword|3charword|word2| By using byte distances, both of these score the same, where Examp

Re: [sqlite] Linux sqlite3 executable return value - what does it return?

2014-06-17 Thread cl
Simon Slavin wrote: > > On 16 Jun 2014, at 9:03pm, c...@isbd.net wrote: > > > > Remember - I said I'm doing an INSERT, either it will insert the > > intended data or there will be an error. > > But there are two types of error: the INSERT command may turn out to be > invalid (accidentally incl