update problem

From: Sudharshan Reddy <Sudharshan(dot)Gundlapalle(at)mcs(dot)vuw(dot)ac(dot)nz>
To: pgsql-novice(at)postgresql(dot)org
Subject: update problem
Date: 2002-09-09 01:55:33
Message-ID: 200209091355.35282.Sudharshan.Gundlapalle@mcs.vuw.ac.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

How can I update several columns in one UPDATE query ?
The users's guide says:
UPDATE table SET col = expression [, ...]
[ FROM fromlist ]
[ WHERE condition ]

CREATE TABLE time(
orderdate date,
day char(10),
month char(10),
year integer
);

UPDATE timed SET month='january' where month='1' and set month='feb' where month = '2';
ERROR: parser: parse error at or near "month"

thanks
sudharshan

--
Sudharshan Reddy G
Masters of Computer Science,
Victoria University Of Willington,
Willington-6004
NewZealand

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Oliver Elphick 2002-09-09 14:29:12 Re: update problem
Previous Message Joel Rodrigues 2002-09-07 14:06:15 Unable to locate type name '? in catalog ERROR