You had an extra comma in your upsert statement. There are two commas between id1 and id2, so you do in fact have four columns, even though one of them is empty.
James On 30 Aug 2015 21:38, "Serega Sheypak" <serega.shey...@gmail.com> wrote: > Hi, Getting error which confuses me. > Here is DDL: > CREATE TABLE IF NOT EXISTS cross_id_attributes > ( > crossId VARCHAR NOT NULL > CONSTRAINT cross_id_reference_pk PRIMARY KEY (crossId) > ) > > Here is upsert query: > upsert into cross_id_attributes(crossId VARCHAR, id1 VARCHAR, ,id2 > VARCHAR)values('crossIdvalue','id1Value','id2Value') > > And exception is: > Number of columns upserting must match number of values. Numbers of > columns: 4. Number of values: 3 > > What does it mean? I have three cols and 3 values >