Hi Randall,
Regarding: how to ".import" an Ascii file (separator is " ")
Assuming that no translations have occurred in transit, it looks as though
you're using a single ascii space as a separator.
So, given a file such as:
cat dog koala
bananna orange kiwi
You should be able to import it using the sqlite command utility:
Sqlite3 myDatabase
Create table myTable (a, b, c);
.separator ' ' or .separator " "
.import myfile mytable
If you are using MS Windows, you may need to double any backslashes needed
for the filename, e.g.
.import \\myDir\\myFile mytable
NOTE that using a single space as a separator does NOT allow you to directly
import text aligned in columns with a variable number of spaces as
separators, such as:
cat dog koala
bananna orange kiwi
If you must import a file such as that, you could either:
1) Use some other utility, such as LMOD to help parse the columns into a
single-separator format.
2) Set the separator to some unused character (perhaps '|'), import the
entire line into a temporary table,
then use "substr()" to populate the columns yourself.
3) Write some code linked with sqlite to import your table.
[opinions expressed are my own, and not my company's]
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------