RE: is this possible to do in one sql
- From: "Guang Mei" <gmei@xxxxxxxxxx>
- To: "Looney, Jason" <Jason.Looney@xxxxxxxxxxxx>, "Oracle-L-freelists" <oracle-l@xxxxxxxxxxxxx>
- Date: Fri, 17 Dec 2004 13:08:49 -0500
Thanks!
Guang
-----Original Message-----
From: Looney, Jason [mailto:Jason.Looney@xxxxxxxxxxxx]
Sent: Friday, December 17, 2004 1:04 PM
To: 'gmei@xxxxxxxxxx'; Oracle-L-freelists
Subject: RE: is this possible to do in one sql
--I have both oracle 8i and 9i running. I want to update two columns in a
--table with two different conditions. Is it possible to do it as one sql
--statment?
Sure. Try this:
UPDATE t1 SET
NOTFLAG = DECODE(NOTFLAG, '1', NULL, NOTFLAG),
EVIDENCE = DECODE(EVIDENCE, '2', NULL, EVIDENCE)
/
Jason.
--
http://www.freelists.org/webpage/oracle-l
- References:
- RE: is this possible to do in one sql
- From: Looney, Jason
Other related posts:
- » is this possible to do in one sql
- » RE: is this possible to do in one sql
- » RE: is this possible to do in one sql
- » RE: is this possible to do in one sql
- » RE: is this possible to do in one sql
- » RE: is this possible to do in one sql
- RE: is this possible to do in one sql
- From: Looney, Jason