On 18 Mar 2015, at 9:24pm, Jason Vas Dias <jason.vas.dias at gmail.com> wrote:

> But now I get another error after the constraint violation :
>  'Error: cannot commit - no transaction is active'
> which gets back to the original point of this post,
> which is that SQLite is evidently not considering
> all text within 'BEGIN TRANSACTION; ... ; $EOT;'

As I explained to you, the way you are passing your commands to the shell tool 
is messing them up.  You are packaging together multiple commands in a pipe and 
your Unix shell is not passing them to sqlite3 correctly.  I don't know which 
Unix shell you're using, or whether it is processing single and double-quotes 
as you expect, but something somewhere is messing up your stream of commands 
before your commands are seen by the sqlite3 program.

In my earlier post I showed you two different ways of executing your own series 
of SQL commands and getting the right results in the right places.  If you use 
either of the methods I showed you with this new INSERT OR ROLLBACK command you 
will get the right result in the right place.

While I'm here, I noticed that you are quoting a text string in your command 
using double-quotes.  This is not correct for SQL, which uses single quotes 
(non-directional apostrophes) around text strings.  Double-quotes have a 
different meaning in SQL.  However, this is not (as far as I can tell) causing 
the problem you are reporting.

Simon.

Reply via email to