Re: PROBLEM with simple SQL-statement

From: John Gillespie <jgg_at_waldo.corte-madera.geoquest.slb.com>
Date: 15 Jun 1994 14:44:44 GMT
Message-ID: <2tn44s$gap_at_k2.San-Jose.ate.slb.com>


In article <kooy.3.771678526_at_frw.ruu.nl>, kooy_at_frw.ruu.nl (J.W. van der Kooy) writes:
|> Hello,
|>
|> I have some problems with performing a, I think, very simple task in an
|> ORACLE-database (using SQLPLUS).
|>
|> My plan was to update a column 'amount' with the value of 'price'
|> multiplied by an appropriate VAT-rate from another table. I tried this:
|>
|> SQL> update MYTABLE set AMOUNT = PRICE *
|> (select distinct VAT from VATTABLE where CATEG = 2);
|>
|> It did not work: I got
|>
|> (select distinct ....
|> *
|> missing expression
|>
|> WHAT must be done differently here???
|>
|> Thanks for answering.
|>
|> Jan Willem van der Kooy
Try:
update MYTABLE set AMOUNT =
(select distinct price * VAT from VATTABLE where CATEG = 2); Received on Wed Jun 15 1994 - 16:44:44 CEST

Original text of this message