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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Populating or Creating a Table from Another using SQL

Re: Populating or Creating a Table from Another using SQL

From: Pat Keenan <pjkeenan_at_ix.netcom.com>
Date: Sat, 26 Feb 2000 08:53:06 -0700
Message-ID: <38B7F6E2.4FB0B03A@ix.netcom.com>


You can use the insert syntax some of which escapes me right now... i.e. insert into usage ... values (SELECT Caid, Pairs FROM RetardedUsage WHERE Caid = 20 and Pairs < 600;);
commit;

Pat Keenan

Courtney Wright wrote:

> I have a table, Usage, that I would like to populate from another table,
> RetardedUsage. RetardedUsage has several columns but I would only like to
> include two in the Usage table. How would I go about doing this using SQL?
>
> SELECT Caid, Pairs FROM RetardedUsage WHERE Caid = 20 and Pairs < 600;
>
> I would like the results from that query to populate the new table, Usage,
> which has already been create and contains the two columns Caid and Pairs.
>
> Then I would like to query RetardedUsage again and append the results to the
> end of Usage. This code will be ran from within an Oracle Forms 4.5 trigger
> by the way...
>
> Please also copy a message to my email cwright_at_tdc-group.com
>
> Thanks,
> Courtney


Received on Sat Feb 26 2000 - 09:53:06 CST

Original text of this message

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