Re: Cursor Not Populating Table
Date: 1997/02/14
Message-ID: <5e2hv3$esf_at_shadow.CSUFresno.EDU>#1/1
In article <3304A14A.A3_at_wmich.edu>,
David E. Daniel <david.daniel_at_wmich.edu> wrote:
>I am trying to create a new table by the following commandS:
>
>drop table temptab3;
>create table temptab3
> (test_sys varchar2(2), test_comp varchar2(2));
>DECLARE
> sys_test temptab3.test_sys%TYPE;
> com_test temptab3.test_comp%TYPE;
> cursor c1 is
> select system,component from temptab2
> order by system,component;
>BEGIN
> open c1;
> loop
> fetch c1 into sys_test, com_test;
> exit when c1%notfound;
---ADD AN INSERT COMMAND HERE----
INSERT INTO TEMPTAB3 VALUES(sys_test,com_test);
> end loop;
>END;
>/
You left out the INSERT command.
To get rid of the "Input truncated" message, key an Enter keystroke after the slash on the last line. SQL Plus complains if you don't.
HTH
Steve Cosner
Try out my dynamic data utility form.
Quick display and update access to any table. http://members.aol.com/stevec5088 Received on Fri Feb 14 1997 - 00:00:00 CET