Re: [SQL] COPY equivalent for updates

2008-07-15 Thread Decibel!
On Jul 15, 2008, at 1:10 AM, Ivan Sergio Borgonovo wrote: I'd like to UPDATE t1 (col1, col2, col3) from file with @1 as primary key; or UPDATE t1 (col1, col2, col3) from file where @1=id; sort of... Sorry, there's nothing like COPY for UPDATE. Otherwise what is the fastest approach? I can

[SQL] COPY equivalent for updates

2008-07-14 Thread Ivan Sergio Borgonovo
Is there a COPY equivalent for updates? eg I've create table t1 ( id int primary key, col1 int, col2 int, col3 varchar(32) ); and a CSV file 10,4,5,"abc" 13,7,3,"def" 18,12,77,"ghi" I'd like to UPDATE t1 (col1, col2, col3) from file with @1 as primary key; or UPDATE t1 (col1, col2, col