我想通過python 2.5將大量數據導入到sqlite數據庫。數據由字符串組成,但數據中有多個重複項。一個例子;Sqlite數據庫中的完整性錯誤
addres,type_code, location
123,01,work
123,01,mall
132,49,home
132,33,home
我的問題是,當加載數據時,我得到一個Integrity error, address and type_code are not unique
。事實確實如此,事實上,當這兩行不是唯一的時候,會有成千上萬次。
我怎樣才能將這些數據輸入到我的數據庫?
發佈你的sqlite模式。 'sqlite .dump foo.db' – JosefAssad 2013-07-13 06:17:37