[sqlite] User Functions

2003-12-05 Thread David Horner
Hey everyone, New list member. I've been using sqlite for some time now and I'm very happy with the results. Very nice. Lately, I've been toying with the idea of creating user defined functions. I've successfully created simple functions that work as the functions provided in func.c work

Re: [sqlite] User Functions

2003-12-05 Thread Doug Currie
> [...] > I'm really lost on how to handle this parent->child relationship > using standard SQL. See > Trees in SQL > Joe Celko > 23 Feb 2001 > Rating: -4.52- (out of 5) Hall of fame tip of the month winner http://searchdatabase.techtarget.com/tip/1,289483,sid13_gci537290,00.html Also see a thr

[sqlite] Pragma setting

2003-12-05 Thread Bronislav Klučka
HI, there are some PRAGMAs in SQLite sql language, is there way hoe to get info about how are they set? Brona - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

[sqlite] Multiple-column subqueries

2003-12-05 Thread Proudlove, John
I'd like to be able to check whether composite keys in one table exist in another. The following syntax is supported by Oracle: SELECT * FROM TABLE_1 WHERE ( TABLE_1.KEY_1, TABLE_1.KEY_2 ) IN ( SELECT KEY_1, KEY_2 FROM TABLE_2 ); When I try it in SQLite, I get the following

[sqlite] ATTACH causes SQLITE_ERROR with reason of "database is locked"

2003-12-05 Thread Derrell . Lipman
I'm occasionally seeing ATTACH failing. sqlite_get_table_vprintf() is returning SQLITE_ERROR (not SQLITE_LOCKED!) but the error string is set to "database is locked". (The query is "ATTACH '/dbpath/global.db' AS global;") The primary database (the open one to which I'm attempting to attach the a

Re: [sqlite] Pragma setting

2003-12-05 Thread Kurt Welgehausen
- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: [sqlite] Pragma setting

2003-12-05 Thread Bronislav Klucka
> > I do not want to know, how to set PRAGMAs, I want to know how are they set. I mean I want to ask something like: "how is show_datatypes?" and I want SQLite to answer me: "show_datatypes is ON" Brona

Re: [sqlite] ATTACH causes SQLITE_ERROR with reason of "database is locked"

2003-12-05 Thread D. Richard Hipp
[EMAIL PROTECTED] wrote: I'm occasionally seeing ATTACH failing. sqlite_get_table_vprintf() is returning SQLITE_ERROR (not SQLITE_LOCKED!) but the error string is set to "database is locked". (The query is "ATTACH '/dbpath/global.db' AS global;") The primary database (the open one to which I'm at

Re: [sqlite] Pragma setting

2003-12-05 Thread Kurt Welgehausen
will tell you whether a particular pragma can be queried. show_datatypes cannot be queried (apparently). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTEC

Re: [sqlite] Multiple-column subqueries

2003-12-05 Thread Kurt Welgehausen
SELECT x.* FROM TABLE_1 x, TABLE_2 y WHERE x.KEY_1=y.KEY_1 and x.KEY_2=y.KEY_2 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: [sqlite] User Functions

2003-12-05 Thread Kurt Welgehausen
There's no good way to handle graphs in SQL. If you had a tree, you could use Celko's nested-set scheme, but from your description, you don't have a tree (unless you're looking at it upside-down). Celko's book, _SQL for Smarties_, has a short chapter on handling non-tree graphs. Also there's a