Re: Cursor Not Populating Table

From: janet <janet_at_SPAM-BLOCK-telesph.com>
Date: 1997/02/26
Message-ID: <33145FAA.73A1_at_SPAM-BLOCK-telesph.com>#1/1


David E. Daniel wrote:

> When performing a 'select * from temptab3;' , I get no rows selected.

not a big surprise, since you never insert!

> Input truncated to 1 characters.

probably since you define the columns as temptab3 %TYPE instead of temptab2 %TYPE.

janet
(to email reply, remove the spam blocker from my address)

>
> 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;
>
> end loop;
> END;
> /
>
> When performing a 'select * from temptab3;' , I get no rows selected.
> 'temptab2' does have system and component, both of varcar2(2).
> When I perform the cursor against sqlplus, I get the two columns from
> temptab2.
> What might I be doing incorrectly?
>
> One clue may be when this script is run, the following is displayed:
>
> Table dropped.
>
> Table created.
>
> Input truncated to 1 characters.
>
> PL/SQL procedure successfully completed.
>
> Any help or advice appreciated.
>
> -David
>
> --
> David E. Daniel
> Oracle Database Administrator
> Western Michigan University
> david.daniel_at_wmich.edu
Received on Wed Feb 26 1997 - 00:00:00 CET

Original text of this message