Rich Shepard wrote:
On Thu, 21 Sep 2006, Igor Tandetnik wrote:
insert into hedge (hedge_name) values ('around');
Igor,
Here's more information. The above works from the command line, that is
'sqlite3 foo.db < load_hedges.sql.' However, it does not work using
.import
within the sqlite shell.
Using the existing database and table I run these two commands:
$ sqlite3 testing.db
sqlite> .import load_hedges.sql hedge
and I get the error message again, 'load_hedges.sql line 1: expected 2
columns of data but found 1.'
If I cannot work within the sqlite shell to load data, I wonder if I
can
load data programmatically using pysqlite2 from within my application.
Thanks,
Rich
Rich,
The .import command in the sqlite shell does not execute SQL statements,
it is used to read raw data in to a table. You want to use the .read
command to read and execute SQL statements.
HTH
Dennis Cote
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------