Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Problem in PL/SQL ???
In article <3770CD9F.7F69EACA_at_sftw.umac.mo>,
d951686_at_sftw.umac.mo wrote:
>
> --------------5B17B2DA6BB83881513AB01F
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
>
> Hello,
>
> Is it possible for the following statement ?
>
> DECLARE
> TYPE myArray IS TABLE OF myTable%ROWTYPE INDEX BY BINARY_INTEGER;
> values myArray;
>
> stmt varchar2(100);
> cid integer;
> rows_processed integer;
> BEGIN
> stmt := 'select * into values(1) from myTable where id
= :var1';
>
> cid := dbms_sql.open_cursor;
> dbms_sql.parse(cid, stmt, dbms_sql.v7);
> dbms_sql.bind_variable(cid, ':var1', '123');
> rows_processed := dbms_sql.execute(cid);
> dbms_sql.close_cursor(cid);
> END;
>
> I just want to select all the fields into the array. But, this code
> can't work.
> Please give me some suggestions. Or teach me how to solve t.
>
> Best regards,
> Eric
>
> --
Why don't you just select all of the records into a cursor?
--
Erik
Consultant
Saraswati Systems Corporation - (SSC)
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Thu Jun 24 1999 - 09:37:55 CDT
![]() |
![]() |