SQLite Forum

.import syntax error on colon character in table name
Login

.import syntax error on colon character in table name

(1) By anonymous on 2020-10-12 17:36:27 [source]

Hello,

SQLite seems to handle the colon character in table names pretty well, as I can create, update and delete table with colon character in it without problem.

But it does not work in the .import command of the command line sqlite.
Example: .import file.csv track:someidthere
Error: Error: near ":someidthere": syntax error

I tried using quotes, single quotes and backslashes, nothing worked.

Is there some way to make it work or is it a bug in .import ?

(2) By Richard Hipp (drh) on 2020-10-12 18:00:49 in reply to 1 [link] [source]

Please update to check-in ce97b56d63d6e03b or later and then quote the table name in the ".import" command like this:

   .import file.csv "track:someidthere"

(3) By anonymous on 2020-10-12 18:28:53 in reply to 2 [link] [source]

It works perfectly with and without quotes with this modification. Thanks for the quick update.