Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Update question
Hi everyone,
This is for Oracle 8.0.5 (and above possibly).
When I attempt to write an update statement with the following syntax:
UPDATE <some table>
SET <some column> = (SELECT 1 FROM DUAL) +
(SELECT 2 FROM DUAL)
I get an error:
SET number_of_batches = (SELECT 1 FROM DUAL) +
*ERROR at line 2:
My question: How to have a single update contain two sub-select? I tried the idea of:
UPDATE <some table>
SET <some column> = (SELECT tab1.col1 + tab2.col1
FROM (SELECT 1 AS col1 FROM DUAL tab1), (SELECT 2 AS col1 FROM DUAL tab2)
but, no good, same error.
Anyone have any ideas?
Thanks very much in advance.
Phil Received on Fri May 23 2003 - 10:46:07 CDT
![]() |
![]() |