Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Simple SQL update
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
![]() |
![]() |