is here a way to import a file into table with ":" being the separator?
for example I have file test.txt with
value1:result1
value2:result2
want to use something like this on the CLI:
sqlite> .import test.txt table
and at the end I would have:
+--------------+
|value1|result1|
+------+-------+
|value2|result2|
+------+-------+
use .separator :
.separator STRING Change separator used by output mode and .import
Here.
If you use .help, you might notice something interesting :
sqlite> .help
...
.help Show this message
.import FILE TABLE Import data from FILE into TABLE
...
.separator STRING Change separator used by output mode and .import
...
So, .import might be what you are searching for ;-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With