开发者

How do I append records to a Sqlite table from a CSV file?

I receive several updated versions of CSV files with new lines appended at the end.

I want that the Import command only appends th开发者_Python百科e records that are not in the table yet.

Thank you


Maybe you can use the INSERT OR IGNORE INTO syntax?

Like: import your CSV into a temp table, and copy over all non-duplicate rows into your final table. Of course, you would need to make sure that the existing rows violate some kind of UNIQUE constraint.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜