[sqlite] Creating custom function for recursive queries

2009-09-16 Thread Marcel Strittmatter
Hi I implemented a custom function that returns a comma separated list of primary keys as a string by making recursive queries. This works well if I don't use subqueries. But I like to use subqueries like this SELECT * FROM users WHERE id IN (SELECT parents('relations', 3)); Below some examp

Re: [sqlite] SQLite Version 3.4.1

2007-07-27 Thread Marcel Strittmatter
Hi The sqlite3 binary in .libs is a dynamic executable. It looks like you have an other installation with version 3.3.8 installed. You may try the following: - run the sqlite3 executable in bld directory (statically linked) - set LD_LIBRARY_PATH to your .libs directory and run .libs/sqlite3

Re: [sqlite] Problems compiling SQLite 3.3.4 on Mac OS X

2006-03-06 Thread Marcel Strittmatter
Hi On my PowerMac G4 with Tiger 10.4.5 (Build 8H14), it works. You can download an archive with finished configure and make steps from the following address: http://www.dinoware.com/mailinglists/sqlite-3.3.4.tar.gz You can look at the configure.log and make.log files to check for differenc

Re: [sqlite] Training opportunity: The Inner Workings Of SQLite

2005-06-19 Thread Marcel Strittmatter
http://conferences.oreillynet.com/oscon2005/ http://conferences.oreillynet.com/os2005/ is the correct url, isn't it? Regards, Marcel

Re: [sqlite] Concatenate NULL strings

2005-04-28 Thread Marcel Strittmatter
I tried using the | operator, but it seems that concatenating a string and a NULL results in a NULL value.. SELECT a | b FROM test WHERE ID=1; -> NULL The operator for concat is ||, | is for bitwise operation, isn't it? So I tried using coalesce (and ifnull), but it converts the string to a integ

Re: [sqlite] HEllo All

2005-03-30 Thread Marcel Strittmatter
I amVery much Beginner to SQLITE, i have very simple query:- How to password protect the db file. There is no simple method to just password protect the database. If you want to protect the database you should consider encrypting it. You can buy the encryption extension from hwaci (http://w

Re: [sqlite] How to do NULL Handling in SELECT Statement?

2005-03-22 Thread Marcel Strittmatter
what is the correct way to query for NULL-values? I use SQLite version 3.2.0 try the following: ... WHERE field IS NULL; or ... WHERE field IS NOT NULL; Marcel

Re: [sqlite] Bind Blob in Version 2 Api

2005-03-22 Thread Marcel Strittmatter
Is there an similiar function to version 2 API to sqlite3_bind_blob function? Version 2 doesn't handle blobs. You must store blobs as encoded strings. Look at the file src/enocde.c to see how to encode strings. Marcel

[sqlite] writing simple or aggregate user function

2005-03-21 Thread Marcel Strittmatter
Hi all, I have a similar setup like the following: CRETAE TABLE users (id int primary key, name varchar(30)); INSERT INTO users VALUES (1, 'john'); INSERT INTO users VALUES (2, 'frank'); INSERT INTO users VALUES (3, 'david'); CREATE TABLE groups (id int primary key, name varchar(20), user

Re: [sqlite] database table is locked

2005-03-16 Thread Marcel Strittmatter
SQLITE_BUSY - another process has the whole database locked SQLITE_LOCKED - one sqlite3_step() is trying to read (or write) the same table that another sqlite3_step() is writing (or reading) using the same DB handle. It sounds as if Mr. Strittmatter is

[sqlite] database table is locked

2005-03-16 Thread Marcel Strittmatter
Hi all When I try to insert data into a table, sqlite3 responses with SQLITE_ERROR and the error message: "database table is locked". I searched already for unfinalized statements but couln't find any. The insert statement is not executed while a query is active... The problem exists only on Wi

[sqlite] Join function in select statement

2004-11-02 Thread Marcel Strittmatter
Hi all I like to have a join function that I can use in a select statement like this: select join(name, ',') from people; this should produce something like this: scott,martin,jones,adams It is not possible to use perl or another script language. The only language I can use is C/C++. Is there a