On 3/23/2011 8:42 AM, Simon Slavin wrote:
> On 23 Mar 2011, at 11:27am, Igor Tandetnik wrote:
>> Shalom Elkin<shalom.el...@gmail.com>  wrote:
>>> id 3 doesn't exist, the insertion fails. Now, this was easy. what if
>>> ac.inhad millions of rows? I am looking for some way to get a message
>>> like "error
>>> in line 3: foreign key mismatch".
>>
>> Write a program that parses the file, runs INSERT statement on each file, 
>> and reports any failures. Do it all in a transaction; at the end, roll it 
>> back.
>
> Could Shalom just type BEGIN and COMMIT around the .import command ?
> Or does the command-line tool execute the .import command internally
> without reference to the context of individual commands ?

He wants a line-by-line error report. .import won't do that.
-- 
Igor Tandetnik

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to