[sqlite] Expecting syntax error on delete

2016-04-11 Thread Hick Gunter
sqlite-users-bounces at mailinglists.sqlite.org] Im Auftrag von Richard Williams Gesendet: Samstag, 09. April 2016 17:21 An: sqlite-users at mailinglists.sqlite.org Betreff: [sqlite] Expecting syntax error on delete I have a PHP program where I have the equivalent of the following code. The code was not deleting the

[sqlite] Expecting syntax error on delete

2016-04-10 Thread R Smith
On 2016/04/09 5:20 PM, Richard Williams wrote: > I have a PHP program where I have the equivalent of the following code. The > code was not deleting the expected rows ('abc' & 'def') because of the bad > syntax. However the error did not throw an exception. Is this what I should > expect? > > $p

[sqlite] Expecting syntax error on delete

2016-04-10 Thread Stephan Beal
; > $stat = $p->exec($sql); > ('abc' & 'def') does not produce a syntax error: sqlite> select 'abc' & 'def'; 0 so your SQL was well-formed, just not what you wanted. Your IN(...) effectively resolved to IN(0). -- - stephan beal http://wanderinghorse.net/home/stephan/

[sqlite] Expecting syntax error on delete

2016-04-10 Thread Simon Slavin
On 9 Apr 2016, at 4:20pm, Richard Williams wrote: > The > code was not deleting the expected rows ('abc' & 'def') because of the bad > syntax. However the error did not throw an exception. Is this what I should > expect? There was no exception because SQLite successfully understood your

[sqlite] Expecting syntax error on delete

2016-04-09 Thread Richard Williams
I have a PHP program where I have the equivalent of the following code. The code was not deleting the expected rows ('abc' & 'def') because of the bad syntax. However the error did not throw an exception. Is this what I should expect? $p = new PDO('sqlite::memory:');

Re: [sqlite] WITH syntax error

2014-07-12 Thread Dan Kennedy
On 07/13/2014 01:24 AM, Staffan Tylen wrote: According to sqlite3 I'm on 3.8.3: SQLite version 3.8.3 2014-02-03 14:04:11 I remember now. There was a bug regarding compound SELECT statements that use CTEs discovered shortly after 3.8.3 was released:

Re: [sqlite] WITH syntax error

2014-07-12 Thread Keith Medcalf
n...@sqlite.org] On Behalf Of Staffan Tylen >Sent: Saturday, 12 July, 2014 11:30 >To: sqlite-users@sqlite.org >Subject: [sqlite] WITH syntax error > >The following statement is flagged as invalid, so what's the correct way >of >coding it? > > WITH A AS (SELEC

Re: [sqlite] WITH syntax error

2014-07-12 Thread RSmith
On 2014/07/12 20:37, Staffan Tylen wrote: Ryan "After your final Select statement, the constructed "WITH" table no longer exists, it's scope is only visible to the select following the declaration, so anything after a UNION is a new select and as such cannot refer to anything inside the

Re: [sqlite] WITH syntax error

2014-07-12 Thread Staffan Tylen
Ryan "After your final Select statement, the constructed "WITH" table no longer exists, it's scope is only visible to the select following the declaration, so anything after a UNION is a new select and as such cannot refer to anything inside the previous select's constructs or clauses." This is

Re: [sqlite] WITH syntax error

2014-07-12 Thread RSmith
On 2014/07/12 19:29, Staffan Tylen wrote: The following statement is flagged as invalid, so what's the correct way of coding it? WITH A AS (SELECT 'A'), B AS (SELECT 'B') SELECT * FROM A UNION SELECT * FROM B ; Hi Staffan, What is wrong with it? Depends what you

Re: [sqlite] WITH syntax error

2014-07-12 Thread Staffan Tylen
According to sqlite3 I'm on 3.8.3: SQLite version 3.8.3 2014-02-03 14:04:11 On Sat, Jul 12, 2014 at 8:06 PM, Dan Kennedy wrote: > On 07/13/2014 12:29 AM, Staffan Tylen wrote: > >> The following statement is flagged as invalid, so what's the correct way >> of >> coding

Re: [sqlite] WITH syntax error

2014-07-12 Thread Dan Kennedy
On 07/13/2014 12:29 AM, Staffan Tylen wrote: The following statement is flagged as invalid, so what's the correct way of coding it? WITH A AS (SELECT 'A'), B AS (SELECT 'B') SELECT * FROM A UNION SELECT * FROM B ; This statement should work in SQLite 3.8.3 or

Re: [sqlite] WITH syntax error

2014-07-12 Thread Petite Abeille
On Jul 12, 2014, at 7:29 PM, Staffan Tylen wrote: > The following statement is flagged as invalid, so what's the correct way of > coding it? Flagged by whom? Invalid how? Either way, from SQLIte point of view, looks legit the way it is.

[sqlite] WITH syntax error

2014-07-12 Thread Staffan Tylen
The following statement is flagged as invalid, so what's the correct way of coding it? WITH A AS (SELECT 'A'), B AS (SELECT 'B') SELECT * FROM A UNION SELECT * FROM B ; Staffan ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] near "?": syntax error

2010-04-28 Thread Manoj M
Thanks for all help. Yes, its an application issue. We fixed it. Regards, Manoj Marathayil On Wed, Apr 28, 2010 at 5:16 PM, Richard Hipp wrote: > On Wed, Apr 28, 2010 at 7:30 AM, Alexey Pechnikov > wrote: > >> 2010/4/28 Manoj M

Re: [sqlite] near "?": syntax error

2010-04-28 Thread Richard Hipp
On Wed, Apr 28, 2010 at 7:30 AM, Alexey Pechnikov wrote: > 2010/4/28 Manoj M : > > I am getting error message "near "?": syntax error" randomly while > > executing the query "SELECT [record] FROM [ac_contacts_cache] LIMIT 0, > > 3". > > The SQL

Re: [sqlite] near "?": syntax error

2010-04-28 Thread Igor Tandetnik
Manoj M wrote: > I am getting error message "near "?": syntax error" randomly while > executing the query "SELECT [record] FROM [ac_contacts_cache] LIMIT 0, > 3". I don't see how this error may arise from this query, seeing as it doesn't contain '?' anywhere. How exactly do you "execute" the

Re: [sqlite] near "?": syntax error

2010-04-28 Thread Igor Tandetnik
Alexey Pechnikov wrote: > 2010/4/28 Manoj M : >> I am getting error message "near "?": syntax error" randomly while >> executing the query "SELECT [record] FROM [ac_contacts_cache] LIMIT 0, >> 3". > > The SQL "LIMIT 0, 3" is incorrect. Use "LIMIT 3 OFFSET 0" instead.

Re: [sqlite] near "?": syntax error

2010-04-28 Thread Alexey Pechnikov
2010/4/28 Manoj M : > I am getting error message "near "?": syntax error" randomly while > executing the query "SELECT [record] FROM [ac_contacts_cache] LIMIT 0, > 3". The SQL "LIMIT 0, 3" is incorrect. Use "LIMIT 3 OFFSET 0" instead. -- Best regards, Alexey

[sqlite] near "?": syntax error

2010-04-28 Thread Manoj M
I am getting error message "near "?": syntax error" randomly while executing the query "SELECT [record] FROM [ac_contacts_cache] LIMIT 0, 3". Table schema: CREATE TABLE IF NOT EXISTS [ac_contacts_cache] ( [record] TEXT NOT NULL ) Any help here is appreciated. Regards, Manoj Marathayil

Re: [sqlite] Schema syntax error

2009-03-22 Thread D. Richard Hipp
On Mar 18, 2009, at 9:39 PM, Tristan Seligmann wrote: > Divmod Axiom[1] is a Python ORM built on SQLite; one of the book > keeping tables it creates in the database has a column named > "indexed", which became a reserved word around SQLite 3.6.4 (?). The > "obvious" fix for this problem is to

Re: [sqlite] Schema syntax error

2009-03-19 Thread Kees Nuyt
On Thu, 19 Mar 2009 03:39:11 +0200, Tristan Seligmann wrote: >Divmod Axiom[1] is a Python ORM built on SQLite; one of the book >keeping tables it creates in the database has a column named >"indexed", which became a reserved word around SQLite 3.6.4 (?). The >"obvious"

[sqlite] Schema syntax error

2009-03-18 Thread Tristan Seligmann
Divmod Axiom[1] is a Python ORM built on SQLite; one of the book keeping tables it creates in the database has a column named "indexed", which became a reserved word around SQLite 3.6.4 (?). The "obvious" fix for this problem is to simply quote the column name using "", but the problem is that it

Re: [sqlite] configure syntax error on HP

2008-06-23 Thread Dennis Cote
Dan wrote: > > You don't, by chance, know how to get gcc to report variable > declarations > mixed in with code as errors (or warnings) do you? > > i.e. how do I get the following to cause an error? > >void somefunction(){ > int one; > popuateOne(); > int two; >} >

Re: [sqlite] configure syntax error on HP

2008-06-22 Thread Jay A. Kreibich
On Sun, Jun 22, 2008 at 05:36:32PM -0400, Matt Sergeant scratched on the wall: > On Sat, 21 Jun 2008 11:50:31 +0700, Dan wrote: > >> On Thu, 19 Jun 2008 12:05:56 -0400, D. Richard Hipp wrote: > >>> On Jun 19, 2008, at 11:49 AM, Matt Sergeant wrote: > > Note that there are some C++ style

Re: [sqlite] configure syntax error on HP

2008-06-22 Thread Matt Sergeant
On Sat, 21 Jun 2008 11:50:31 +0700, Dan wrote: > >> On Thu, 19 Jun 2008 12:05:56 -0400, D. Richard Hipp wrote: >>> >>> On Jun 19, 2008, at 11:49 AM, Matt Sergeant wrote: Note that there are some C++ style comments crept back into the code (I noticed in the amalgamation, so I

Re: [sqlite] configure syntax error on HP

2008-06-20 Thread Dan
On Jun 21, 2008, at 1:27 AM, Matt Sergeant wrote: > On Thu, 19 Jun 2008 12:05:56 -0400, D. Richard Hipp wrote: >> >> On Jun 19, 2008, at 11:49 AM, Matt Sergeant wrote: >>> >>> Note that there are some C++ style comments crept back into the code >>> (I >>> noticed in the amalgamation, so I can't

Re: [sqlite] configure syntax error on HP

2008-06-20 Thread Matt Sergeant
On Thu, 19 Jun 2008 12:05:56 -0400, D. Richard Hipp wrote: > > On Jun 19, 2008, at 11:49 AM, Matt Sergeant wrote: >> >> Note that there are some C++ style comments crept back into the code >> (I >> noticed in the amalgamation, so I can't give you a direct pointer to >> them). This causes

Re: [sqlite] configure syntax error on HP

2008-06-19 Thread D. Richard Hipp
On Jun 19, 2008, at 11:49 AM, Matt Sergeant wrote: > > Note that there are some C++ style comments crept back into the code > (I > noticed in the amalgamation, so I can't give you a direct pointer to > them). This causes compile failures on stricter C compilers. Already been fixed.

Re: [sqlite] configure syntax error on HP

2008-06-19 Thread Dan
On Jun 19, 2008, at 10:49 PM, Matt Sergeant wrote: > On Wed, 18 Jun 2008 19:58:02 -0400, D. Richard Hipp wrote: >> >> On Jun 18, 2008, at 7:12 PM, Andrea Connell wrote: >> >>> I want to use the C API with a C++ class but when I try compiling... >>> >>> $ aCC -AA +W829 main.cpp sqlite3.c >>>

Re: [sqlite] configure syntax error on HP

2008-06-19 Thread Matt Sergeant
On Wed, 18 Jun 2008 19:58:02 -0400, D. Richard Hipp wrote: > > On Jun 18, 2008, at 7:12 PM, Andrea Connell wrote: > >> I want to use the C API with a C++ class but when I try compiling... >> >> $ aCC -AA +W829 main.cpp sqlite3.c >> main.cpp: >> sqlite3.c: >> Error 482: "sqlite3.c", line 532 #

Re: [sqlite] configure syntax error on HP

2008-06-19 Thread Andrea Connell
. Richard Hipp Sent: Wednesday, June 18, 2008 6:58 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] configure syntax error on HP On Jun 18, 2008, at 7:12 PM, Andrea Connell wrote: > I want to use the C API with a C++ class but when I try compiling... > > $ aCC -AA +W829

Re: [sqlite] configure syntax error on HP

2008-06-18 Thread D. Richard Hipp
On Jun 18, 2008, at 7:12 PM, Andrea Connell wrote: > I want to use the C API with a C++ class but when I try compiling... > > $ aCC -AA +W829 main.cpp sqlite3.c > main.cpp: > sqlite3.c: > Error 482: "sqlite3.c", line 532 # Array of unknown size; 'const char SQLite is written in C, not C++. You

Re: [sqlite] configure syntax error on HP

2008-06-18 Thread Andrea Connell
'sh ./configure' like the >> install instructions suggest. I got a syntax error right away. >> >> ~/sqlite/sqlite-amalgamation-3.5.9.tar/sqlite-amalgamation-3.5.9 >> lacpghp1> ./configure >> interpreter "/bin/sh" not found > >A system without /bin

Re: [sqlite] configure syntax error on HP

2008-06-18 Thread D. Richard Hipp
e the > install instructions suggest. I got a syntax error right away. > > ~/sqlite/sqlite-amalgamation-3.5.9.tar/sqlite-amalgamation-3.5.9 > lacpghp1> ./configure > interpreter "/bin/sh" not found A system without /bin/sh hardly qualifies as Unix, does it? Looks like y

[sqlite] configure syntax error on HP

2008-06-18 Thread Andrea Connell
I'm trying to compile 3.5.9 on an HP-UX 11i v1 machine but I can't get past step one... I unpacked the amalgamation, cd'd to the directory, and ran './configure' - that didn't work so I tried 'sh ./configure' like the install instructions suggest. I got a syntax error right away. ~/sqlite