[sqlite] Probably, bug in SQLite (Or, what is wrong with this query?)

2006-04-02 Thread Alexander Kozlovsky
Hello! Can anybody tell me, what is wrong with this simple query: select a, (select c from (select b + 1 as c) as Table2) as d from (select 1 as a, 2 as b) as Table1 The error arise at line 2 ("no such column: b"). AFAIK, the syntax is perfectly correct. This error arise

Re: [sqlite] Probably, bug in SQLite (Or, what is wrong with this query?)

2006-04-02 Thread Cory Nelson
I don't claim to be a master of SQL, but isn't "select b + 1 as c" its own query, without access to the "2 as b" in the outer query? On 4/2/06, Alexander Kozlovsky <[EMAIL PROTECTED]> wrote: > Hello! > Can anybody tell me, what is wrong with this simple query: > > select a, (select c >

Re: [sqlite] Probably, bug in SQLite (Or, what is wrong with this query?)

2006-04-02 Thread Alexander Kozlovsky
Cory Nelson wrote: > > Can anybody tell me, what is wrong with this simple query: > > > >select a, (select c > > from (select b + 1 as c) as Table2) as d > >from (select 1 as a, 2 as b) as Table1 > > I don't claim to be a master of SQL, but isn't "select b + 1 as c" its >

Re: [sqlite] Probably, bug in SQLite (Or, what is wrong with this query?)

2006-04-02 Thread Joe Wilson
--- Alexander Kozlovsky <[EMAIL PROTECTED]> wrote: > > > Can anybody tell me, what is wrong with this simple query: > > > > > >select a, (select c > > > from (select b + 1 as c) as Table2) as d > > >from (select 1 as a, 2 as b) as Table1 > But this query is work well: > >

Re: [sqlite] Probably, bug in SQLite (Or, what is wrong with this query?)

2006-04-02 Thread Joe Wilson
Nevermind. They are the same once you add: insert into bogus values(5,6,7); > sqlite> CREATE TABLE bogus(x,y,z); -- empty > > sqlite> select a, (select b + 1 as c from bogus) as d from (select 1 as a, 2 > as b) as Table1; > a d > -- -- > 1

[sqlite] Re: Probably, bug in SQLite (Or, what is wrong with this query?)

2006-04-02 Thread Alexander Kozlovsky
> Does these queries work on other databases? I can test only MS SQL Server today, and the original query generates error. IMHO, the bug is in both SQLite and MS SQL Server :) > Are they valid correlated subqueries? I think, yes.

[sqlite] Fwd: how to fix problem of lock

2006-04-02 Thread Cesar David Rodas Maldonado
-- Forwarded message -- From: Cesar David Rodas Maldonado <[EMAIL PROTECTED]> Date: Apr 2, 2006 10:51 PM Subject: how to fix problem of lock To: SQLIte help <[EMAIL PROTECTED]> I have a database that i do a lot of insert and select... really a lot but i have a problem with the

Re: [sqlite] How to unsubscribe from this maillist ?

2006-04-02 Thread Cesar David Rodas Maldonado
why do you want to unsuscribe? On 4/1/06, z-axis <[EMAIL PROTECTED]> wrote: > > thanks > >