Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Query problem with UPDATE
set campo1 = (select campo1 + campo2 from tavola2 where )
No PL/SQL necessary
Regards,
Sybrand Bakker, Oracle DBA
"Marco Pinzuti" <mpinzuti_at_virgilio.it> wrote in message
news:20001207162201.ZQZG28429.mta1@[212.48.4.51]...
> I've tried to carry out the following query:
>
> UPDATE TAVOLA1
> SET CAMPO1 = CAMPO1 + (SELECT CAMPO2 FROM TAVOLA2 WHERE ...);
>
> Oracle answers by saying MISSING EXPRESSION
>
> I've solved the issue by writing a PL/SQL program where I put the result
> of SELECT CAMPO2 FROM TAVOLA2 WHERE .. into a variable X and then
> by performing:
> UPDATE TAVOLA1
> SET CAMPO1 = CAMPO1 + X;
>
> Does it exists any other way to do so without writing a PL/SQL program?
>
> Thanks in advance
>
> ----------------------------------------------
> Virgilio Mail - Il tuo indirizzo E-mail gratis
> http://mail.virgilio.it
>
>
>
> --
> Posted from [212.48.4.46]
> via Mailgate.ORG Server - http://www.Mailgate.ORG
Received on Thu Dec 07 2000 - 15:48:51 CST
![]() |
![]() |