Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group