Ryan, Simon, thank you both for the help.
The script works fine, and I now also understand how to use this bail
mechanism. It is great!
once more: THANK YOU!
gert
2015-04-01 23:17 GMT+02:00 Simon Slavin :
>
> On 1 Apr 2015, at 8:09pm, Gert Van Assche wrote:
>
> > But this is definitely not
On 2015-04-01 09:09 PM, Gert Van Assche wrote:
> Dr. Hipp, thanks for the tip. I put
> .bail on
> in the script.
>
>
> Ryan, I think I don't know how to trigger the bail out from within a SELECT
> statement.
> I tried
> SELECT CASE (select count(*) from T1) WHEN (select count(*) from
On 1 Apr 2015, at 8:09pm, Gert Van Assche wrote:
> But this is definitely not the right way to do it. If I understand the doc
> correctly, it should be an expression, but I don't see how I can do this...
You can trigger a bail by causing any SQL error. For example, inserting a
duplicate
Dr. Hipp, thanks for the tip. I put
.bail on
in the script.
Ryan, I think I don't know how to trigger the bail out from within a SELECT
statement.
I tried
SELECT CASE (select count(*) from T1) WHEN (select count(*) from T2)
then 'OK' else RAISE(FAIL) END;
But this is definitely not the
On 2015-04-01 08:29 PM, Gert Van Assche wrote:
> Hi all,
>
> When running SQLite3 from command line, is there a way to interrupt the CMD
> file when a condition is true?
>
> I'm importing a lot of plain text files that should all count the same
> number of lines, so I want to compare the record
Hi all,
When running SQLite3 from command line, is there a way to interrupt the CMD
file when a condition is true?
I'm importing a lot of plain text files that should all count the same
number of lines, so I want to compare the record count of all imported data
with the first file that was
On 4/1/15, Gert Van Assche wrote:
>
> My question is: when the import fails (detected in the script.sql file), I
> would like to stop executing the batch file (runscript.cmd).
>
> Is there a way to do so?
>
Have you tried the -bail command-line option?
--
D. Richard Hipp
drh at sqlite.org
7 matches
Mail list logo