Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Simple SQL update

Simple SQL update

From: Randy Harris <please_at_send.no.spam>
Date: Sun, 13 Aug 2006 11:04:05 GMT
Message-ID: <FGDDg.449$q63.426@newssvr13.news.prodigy.com>


I'm trying to do an update in Oracle 9i that seems like it should be very simple but I can't figure out the syntax. The update needs to use a different formula Dependant on the current value of the attribute.

Simplified:

UPDATE MyTable Set F1 = (F1 > 1) * 2 + 1 ;

This returns a missing right parenthesis error.

As does

Select (2>1) FROM dual ;

How do I put the comparison into the calculation?

-- 
Randy Harris
tech at promail dot com
I'm pretty sure I know everything that I can remember.
Received on Sun Aug 13 2006 - 06:04:05 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US