Re: [sqlite] correlated subquery in LIMIT/OFFSET?

2013-04-11 Thread James K. Lowden
On Thu, 11 Apr 2013 17:14:43 +0200 Clemens Ladisch wrote: > >> It should come (or be derived) from the current row in the outer > >> query. > > > > Sorry, but inner queries are performed first. > > Sorry, but *correlated* inner queries are performed once for each > record in

Re: [sqlite] ORDER BY finds "AS" names ambiguous that shouldn't be?

2013-04-11 Thread Perry Wagle
On Apr 11, 2013, at 5:56 AM, Stephen Chrzanowski wrote: > Looking at the query, in the CLI, what if you rename the three bolded > "title" fields to something else? I think the system is getting messed up > because a field in a table is called "title" and you're naming a

Re: [sqlite] correlated subquery in LIMIT/OFFSET?

2013-04-11 Thread Clemens Ladisch
Simon Slavin wrote: > On 11 Apr 2013, at 2:38pm, Clemens Ladisch wrote: >>> sqlite> create table t(x); >>> sqlite> select (select 42 limit 1 offset (select t.x)) from t; >>> Error: no such column: t.x > >> It should come (or be derived) from the current row in the outer

Re: [sqlite] correlated subquery in LIMIT/OFFSET?

2013-04-11 Thread Simon Slavin
On 11 Apr 2013, at 2:38pm, Clemens Ladisch wrote: >> sqlite> create table t(x); >> sqlite> select (select 42 limit 1 offset (select t.x)) from t; >> Error: no such column: t.x > It should come (or be derived) from the current row in the outer query. Sorry, but inner

Re: [sqlite] correlated subquery in LIMIT/OFFSET?

2013-04-11 Thread Michael Black
I think you need a more complete example with the output you expect to get better help. Although I do understand what you're getting at. Mike -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Clemens Ladisch Sent: Thursday,

Re: [sqlite] correlated subquery in LIMIT/OFFSET?

2013-04-11 Thread Clemens Ladisch
Michael Black wrote: > > However, it appears that SQLite does not allow correlated subqueries > > in the LIMIT/OFFSET clauses of a scalar subquery: > > > > sqlite> create table t(x); > > sqlite> select (select 42 limit 1 offset (select t.x)) from t; > > Error: no such column: t.x > > Instead

Re: [sqlite] correlated subquery in LIMIT/OFFSET?

2013-04-11 Thread Michael Black
Instead of "select t.x" don't you really want "select x from t" ?? That seems to work at least syntactically. I assume you just want the offset to come from a single-row table? Mike -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On

[sqlite] correlated subquery in LIMIT/OFFSET?

2013-04-11 Thread Clemens Ladisch
Hi, for computing the median of a group, it would be useful to be able to use a correlated subquery as the expression in a OFFSET clause. However, it appears that SQLite does not allow correlated subqueries in the LIMIT/OFFSET clauses of a scalar subquery: sqlite> create table t(x); sqlite>

Re: [sqlite] ORDER BY finds "AS" names ambiguous that shouldn't be?

2013-04-11 Thread Stephen Chrzanowski
Looking at the query, in the CLI, what if you rename the three bolded "title" fields to something else? I think the system is getting messed up because a field in a table is called "title" and you're naming a query called "title" but you're not distinctly stating which "title" you want to query

Re: [sqlite] FreeBSD and SQLITE_ENABLE_LOCKING_STYLE

2013-04-11 Thread Richard Hipp
On Thu, Apr 11, 2013 at 4:03 AM, Baptiste Daroussin < baptiste.darous...@gmail.com> wrote: > Ok so I was not going in the right direction :) > > So how it is possible to corrupt a database on nfsv4? Does that ring a bell > to someone? > > Probably the posix advisory locks are not working. Have

Re: [sqlite] FreeBSD and SQLITE_ENABLE_LOCKING_STYLE

2013-04-11 Thread Simon Davies
On 11 April 2013 09:03, Baptiste Daroussin wrote: > Ok so I was not going in the right direction :) > > So how it is possible to corrupt a database on nfsv4? Does that ring a bell > to someone? In case you have not already seen it:

Re: [sqlite] FreeBSD and SQLITE_ENABLE_LOCKING_STYLE

2013-04-11 Thread Baptiste Daroussin
Ok so I was not going in the right direction :) So how it is possible to corrupt a database on nfsv4? Does that ring a bell to someone? 2013/4/11 Richard Hipp > On Wed, Apr 10, 2013 at 6:40 PM, Baptiste Daroussin < > baptiste.darous...@gmail.com> wrote: > > > I'm trying to

Re: [sqlite] System.Data.Sqlite NuGet

2013-04-11 Thread Joe Mistachkin
Baruch Burstein wrote: > > I installed System.Data.Sqlite from via NuGet, but I don't see it in the > options for creating a new database (server explorer or whatever it is > called). I am using VS2010 Ultimate. > Am I doing something wrong? > The NuGet packages for System.Data.SQLite do not

[sqlite] System.Data.Sqlite NuGet

2013-04-11 Thread Baruch Burstein
I installed System.Data.Sqlite from via NuGet, but I don't see it in the options for creating a new database (server explorer or whatever it is called). I am using VS2010 Ultimate. Am I doing something wrong? -- ˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı