Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: insert into one table with selects from 4 others
A copy of this was sent to chrisoc_at_ans.net
(if that email address didn't require changing)
On Fri, 12 Mar 1999 21:35:27 GMT, you wrote:
>
>
>I need some sample syntax doing this:
>
I think you want to insert/select. you seem mixing update and insert together... but anyway see if:
insert into tablea ( v1, v2, v3, v4 )
select *
from ( select sysdate v1 from dual ), ( select sum(something) v2 from tableb ), ( select min(something) v3 from tablec ), ( select avg(something) v4 from tabled )/
>Update TableA insert (V1, V2, V3 V4)
>using (select sysdate from dual V1, select sum(something) from TableB V2,
> select min(something) from TableC V3, select avg(something) from TableD V4)
>
>assume the data types are 100% compatible
>
>Thanks
>I am stumbling around and cannot hit on the syntax to make SQLPlus happy.
>
>Chris O'Connor
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA
--
http://govt.us.oracle.com/ -- downloadable utilities