SQLite Forum

Additional Delimiter Support for the CSV Virtual Table Module
Login
Other separators are supported by the sqlite3 shell. Consider this script:

```shell
#!/bin/bash
set -x # echo commands
rm -f test.db* test.csv # clean start
# create colon delimited input file
cat >test.csv <<EOF
1:a:b
2:c:d
3:e:f
EOF
sqlite3 test.db \
"CREATE TABLE t1 ( \
id INTEGER PRIMARY KEY NOT NULL, \
a TEXT, \
b TEXT)" \
".mode csv" \
".separator ':'" \
".import test.csv t1" \
".mode box" \
"SELECT * FROM t1"
```

HTH

~~~
-- 
Regards,
Kees Nuyt
~~~