Re: [SQL] Can't get upsert working.

2012-12-04 Thread Richard Huxton
On 30/11/12 17:00, Bert wrote: SELECT (ET.row1, ET.row2, ET.row3) But I always get this error message: ERROR: column "row1" is of type integer but expression is of type record LINE 67: SELECT (ET.ROW1, Does anyone has an idea? You've bracketed the SELECT colums above, which means i

Re: [SQL] Can't get upsert working.

2012-12-03 Thread Jasen Betts
On 2012-12-02, Jasen Betts wrote: > On 2012-11-30, Bert wrote: > >> Anyone here with upsert experience? This guy "Depesz" does: http://www.depesz.com/2012/06/10/why-is-upsert-so-complicated/ -- ⚂⚃ 100% natural -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes t

[SQL] Can't get upsert working.

2012-11-30 Thread Bert
Hello, Anyone here with upsert experience? I'm trying to run this query: WITH UPSERT AS (UPDATE oltp.ST_TRANSACTION SET (row1, row2, row3) = (ET.row1, ET.row2, ET.row3) FROM (SELECT * FROM loadoltp.ST_TRANSACTION_INSERT WHERE LOADTABLETIME = '20