Re: [sqlite] UPDATE in multiple same table

2008-03-23 Thread Emilio Platzer
Thank's It works also in PostgreSQL! Emilio Platzer Igor Tandetnik escribió: > "Emilio Platzer" <[EMAIL PROTECTED]> wrote > in message > news:[EMAIL PROTECTED] >> I try (and not works): >> >> CREATE TABLE nodes( >> id integer primary key, >> father_id integer, >> depth integer); >> INSERT

Re: [sqlite] UPDATE in multiple same table

2008-03-23 Thread Igor Tandetnik
"Emilio Platzer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I try (and not works): > > CREATE TABLE nodes( > id integer primary key, > father_id integer, > depth integer); > INSERT INTO nodes (id,father_id,depth) VALUES (9,null,1); > INSERT INTO nodes (id,father_id,depth)

Re: [sqlite] UPDATE in multiple same table

2008-03-23 Thread Emilio Platzer
I try that solution but don't work. The reason is that in the subquery if a field don't prefix with an alias (or a table name) the parser supouses that was of de first table [[[--- Sorry about my poor Englis ---]]] I try (and not works): CREATE TABLE nodes( id integer primary key, father_id

Re: [sqlite] Major memory leak

2008-03-23 Thread Christian Smith
On Fri, Mar 21, 2008 at 10:41:10AM -0400, Rob Richardson wrote: > My SQLite library is built from the single translation unit > sqlite.c/sqlite.h. That file contains the version number 3.3.17. > > I do not have valgrind, but circumstantial evidence that this is a > SQLite problem is strong.

[sqlite] Is it safe to ...

2008-03-23 Thread Alexander Batyrshin
Hello, Is it safe to use this algorithm: open_db fork() sql_do() // both parent and child executes sql statements close_db I am not familiar with locking mechanism and I am afraid that if parent and child will use the same DB handlers it can cause of DB corruptions -- Alexander Batyrshin

[sqlite] Problems Compiling Sqlite

2008-03-23 Thread Jus GoodFun
Hi All, Sorry if this has been covered before but I really need some help getting Sqlite to compile into my project. I develop in 'C' within the Windows version of the Eclipse Environement producing embedded systems focused on the Motorola ColdFire Processors specifically the

Re: [sqlite] UPDATE in multiple same table

2008-03-23 Thread Igor Tandetnik
"Emilio Platzer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I want to UPDATE a field of one table with data of rows of the same > table. > > For example to calculate the depth of a node in a tree > > update nodes as s set s.depth= >(select f.depth+1 > from nodes as f

[sqlite] UPDATE in multiple same table

2008-03-23 Thread Emilio Platzer
I want to UPDATE a field of one table with data of rows of the same table. For example to calculate the depth of a node in a tree update nodes as s set s.depth= (select f.depth+1 from nodes as f where f.id=s.father_id) where s.depth is null; I could do this in a ugly

[sqlite] Check out my Facebook profile

2008-03-23 Thread Adelle Richardson
I set up a Facebook profile with my pictures, videos and events and I want to add you as a friend so you can see it. First, you need to join Facebook! Once you join, you can also create your own profile. Thanks, Adelle Here's the link: