Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> value function in SQL does not work

value function in SQL does not work

From: Tom Xu <tom_xu_at_msn.com>
Date: Sat, 21 Jul 2001 21:29:04 GMT
Message-ID: <d938f4e5.0107050833.19fea061@posting.google.com>

Hello All,

    I refer to the Oracle 8.1.7 SQL Reference documentation. There is a sample showing how to using SET VALUE in update: ( on page 1106)

update table1 p set value(p) = (select value(q) from table2 q where p.id = q.id) where p.id = 10;

I accormendated this syntax to my real table name in sql*plus, but it complains that p and q are invalid column name. (in my case, the id is the primary key of both table, and table1 and table2 have the same structure)

I put the SQL into a stored procedure , but the stored procedure compiled with error.

How can I use this sytax? Is there any standard SQL can do the same thing?(the difficult part is that I need to update all the columns in table1)

thanks for any help!

Tom Received on Sat Jul 21 2001 - 16:29:04 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US