[EMAIL PROTECTED] wrote:
I think the problem lies in the fact that .import needs single quotes round the filename. But ...In Sqlite3 the .import command replaces the old COPY.
When I try to use it to import a .csv file into a table t1 in database test.db I always get the error message
Error: no such table : t1;
Probably I've got something wrong with the syntax of the .import command:
I used >sqlite3 test.db ".import test2.csv t1";
Unfortunately the sqlite site does not provide a working example how to use the .import command correctly.
The table is existent, since >sqlite3 test.db "select * from t1"; produces correct results.
The file test2.csv is existent and in the same path as sqlite3.exe on a windows system.
Can somebody help me?
Thx Reinhold
I use the following method...
*.separator '|' .import '.\Import\Artikels.csv' Artikels*
is the content of my .imp files (one for every table - generated by my module generator)
*for %%F in (.\\scripts\\*.imp) do sqlite %1 < %%F*
This is the content of my *filltables.bat* file, which processes all .imp files and is called this way: 'filltables DB' where DB is the name of the database.
Hope this helps you out, Pascal ZENON productions bvba

