Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Query problem with UPDATE
You must have had a syntax error somewhere in your sql statement. The form update table set amt=amt + (select another_amt from another table...) is acceptable. Maybe you could include the whole sql statement you attempted to use?
In article <20001207162201.ZQZG28429.mta1@[212.48.4.51]>,
mpinzuti_at_virgilio.it (Marco Pinzuti) wrote:
> 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
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Dec 07 2000 - 16:02:36 CST
![]() |
![]() |