Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: ORA-00905 error in PL/SQL code
You can't use into with dbms_sql, you'll need to use
dbms_sql.define_column prior to execution
dbms_sql.execute_and_fetch in execution
and dbms_sql.column_value to retrieve the result.
Hth,
Sybrand Bakker, Oracle DBA
Gennady <gennadyb_at_halcosoftware.com> schreef in berichtnieuws
3934160a$0$32021_at_fountain.mindlink.net...
> Hello,
> I'm trying to execute the code:
> declare
> c2 number;
> d2 number;
> k number;
> vin_table_name varchar2(30):='MYTABLE';
> begin
> dbms_output.enable;
> c2 := dbms_sql.open_cursor;
> dbms_sql.parse(c2, 'select count(*) into '||k||' from
> '||vin_table_name||'',dbms_sql.native);
> d2:=dbms_sql.execute(c2);
> dbms_output.put_line(k);
> dbms_sql.close_cursor(c2);
> end;
>
> But I get error ORA-00905: missing keyword.
> Could you please give me a hint how to fix the problem?
> Thanks,
> Gennady
>
>
>
Received on Tue May 30 2000 - 00:00:00 CDT
![]() |
![]() |