sqlite - SQL import file to update table values -


how import csv file database either sqlite or postgresql updates values in table , of course inserts new ones.

thank you...

pd: im loving community. fast accurate answers.

i'm not familiar enough sqlite know if same constructs available, asked postgres. so... postgres, use copy from command import data staging table. run following sql:

update destination d set [whatever updating] staging s d.id = s.id  insert destination select * staging s s.id not in (   select id destination ) 

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -