[sqlite] deriving Foreign Key constraints

2011-12-12 Thread Roughbert Strong
Suppose that we want to know what the foreign key constraints are on columns returned by a query. Can we obtain this information without parsing the query itself and looking at the PRAGMA foreign_key_list for each table thus discovered? ___

Re: [sqlite] Poor performance with nested query in outer join

2011-12-12 Thread Nick Smallbone
Simon Slavin writes: > I understand that SQLite handles VIEWs as if you had defined and saved > a SELECT statement. So if you JOIN with a VIEW, does SQLite handle it > as as JOIN or a sub-SELECT ? It's just the same as if you JOIN with a sub-SELECT (the query for the

Re: [sqlite] deriving Foreign Key constraints

2011-12-12 Thread Simon Slavin
On 12 Dec 2011, at 9:26am, Roughbert Strong wrote: > Suppose that we want to know what the foreign key > constraints are on columns returned by a query. Can we obtain this > information > without parsing the query itself and looking at the PRAGMA foreign_key_list > for each table thus >

Re: [sqlite] Strange behavior on SQLite 3.7x compared with 3.6.22

2011-12-12 Thread Alessandro Merolli
Thank you D. Richard Hipp, for your time and nice work. On 10/12/2011, at 15:25, Richard Hipp wrote: On Thu, Dec 8, 2011 at 12:25 PM, Alessandro Merolli wrote: Hi, We've being working with SQLite version 3.6.22 in our project and we wish to upgrade it to the

Re: [sqlite] EXT :Re: Poor performance with nested query in outer join

2011-12-12 Thread Black, Michael (IS)
Why do you have a subselectwhat are you doing there that you can't do in the "on" clause? Can you show your subselect? Your example isn't enough. Michael D. Black Senior Scientist Advanced Analytics Directorate Advanced GEOINT Solutions Operating Unit Northrop Grumman Information

Re: [sqlite] EXT :Re: Poor performance with nested query in outer join

2011-12-12 Thread Nick Smallbone
"Black, Michael (IS)" writes: > Why do you have a subselectwhat are you doing there that you can't > do in the "on" clause? In the "real" example I'm joining with a view: create view v as select * from b where ... select * from a left natural join v where id = 1;

Re: [sqlite] Aggregating Forex data

2011-12-12 Thread Rafael Garcia Leiva
El 24/11/2011 19:18, Rafael Garcia Leiva escribió: El 24/11/2011 14:49, 雷钦 escribió: On 2011-11-24 08:02:21 +, Simon Slavin wrote: On 24 Nov 2011, at 7:42am, Rafael Garcia Leiva wrote: CREATE TABLE eurusd ( date TEXT NOT NULL PRIMARY KEY, open REAL NOT NULL, high REAL

Re: [sqlite] EXT :Re: Poor performance with nested query in outer join

2011-12-12 Thread Richard Hipp
On Mon, Dec 12, 2011 at 9:33 AM, Nick Smallbone wrote: > "Black, Michael (IS)" > writes: > > > Why do you have a subselectwhat are you doing there that you can't > > do in the "on" clause? > > In the "real" example I'm joining with a view: >

Re: [sqlite] Aggregating Forex data

2011-12-12 Thread Igor Tandetnik
On 12/12/2011 9:45 AM, Rafael Garcia Leiva wrote: Now I need the Open and the Close of the 5 minutes interval, where Open is the Open of the first minute of the interval, and Close is the Close of the last minute of the interval. Something like this: select strftime('%Y-%m-%d %H:%M',

[sqlite] Fts */or. Inconsistencies

2011-12-12 Thread Ephraim Stevens
SQLite Gurus, In SQLIte FTS3/4, does the '*' (wildcard expansion character) discriminate between alphanumeric characters vs non-alpha numeric characters when matching? I have two test cases below which causes me to believe that it does. Also, the OR operator appears to fail when matching against

Re: [sqlite] Fts */or. Inconsistencies

2011-12-12 Thread Dan Kennedy
On 12/13/2011 02:29 AM, Ephraim Stevens wrote: I'm using a custom tokenizer in each scenario (yes it works and the proof is enclosed). In the first dataset, the data was tokenized such that any alphanumeric character qualifies as part of a token. In the second dataset, the data was tokenized

[sqlite] Bash Scripting

2011-12-12 Thread Alberto De La Torre
Hello I have a problem scripting with sqlite3 I can use, on the same bash the line sqlite3 /Users/alberto/Documents/Casa/Domótica/Programas/cronizados/WeatherTracker/casa\ Database.sdb "select OutsideTemp from WXData where RecDateTime>='2011-12-07 21:22' and RecDateTime<='2011-12-07 21:27'

Re: [sqlite] Bash Scripting

2011-12-12 Thread Black, Michael (IS)
You need to surround your entire sqlite3 command with back tics. TomaCampo=`sqlite3 /Users/.and RecordTy8pe='R';"` That's how you execute a command in bourne shell. Michael D. Black Senior Scientist Advanced Analytics Directorate Advanced GEOINT Solutions Operating Unit Northrop

[sqlite] Cross-compiled sqlite3 tool runs into segmentation fault when creating a table

2011-12-12 Thread imin imup
Hello, I'm cross-compiling SQLite 3.6.12 onto Fedora 14 on MIPS cpu. The command line tool sqlite3 runs into segmentation fault when I tried to create a table: # sqlite3_mipsel test.db SQLite version 3.6.12 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite>

Re: [sqlite] Cross-compiled sqlite3 tool runs into segmentation fault when creating a table

2011-12-12 Thread Richard Hipp
On Mon, Dec 12, 2011 at 11:34 PM, imin imup wrote: > Hello, > > I'm cross-compiling SQLite 3.6.12 onto Fedora 14 on MIPS cpu. The command > line tool sqlite3 runs into segmentation fault when I tried to create a > table: > > > # sqlite3_mipsel test.db > SQLite version 3.6.12