Generate insert SQL statements from a CSV file

后端 未结 12 2109
轮回少年
轮回少年 2020-12-04 16:07

I need to import a csv file into Firebird and I\'ve spent a couple of hours trying out some tools and none fit my needs.

The main problem is that al

12条回答
  •  情深已故
    2020-12-04 16:55

    You can use the free csvsql to do this.

    • Install it using these instructions
    • Now run a command like so to import your data into your database. More details at the links above, but it'd be something like:

      csvsql --db firebase:///d=mydb --insert mydata.csv

    • The following works with sqlite, and is what I use to convert data into an easy to query format

      csvsql --db sqlite:///dump.db --insert mydata.csv

提交回复
热议问题