Re: COMMENT call gives PLS-00103
Date: 2000/05/04
Message-ID: <957422995.17582.0.pluto.d4ee154e_at_news.demon.nl>#1/1
<sysmansm_at_my-deja.com> schreef in berichtnieuws
8eqcce$6l2$1_at_nnrp1.deja.com...
> I am trying to write a comment into the data dictionary for a
> given column. I believe the syntax is OK.
>
> My PLSQL code fragment looks like:
>
> begin
> ...
> COMMENT ON COLUMN schema.tablename.column_name IS 'some text in here';
> ...
> end;
>
> This fails with Error Text PLS-00103: Encountered the symbol ON when
> expecting one of :=.(_at_%;
>
> This code works fine from the SQL> prompt.
>
>
> I would appreciate any clues on why this fails to compile.
>
> Cheers Grant
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
This is DDL. DDL doesn't work directly in pl/sql. Use the dbms_sql package (v7,v8) or execute immediate 'command' (v8i).
short dbms_sql stub
create or replace procedure do_sql(sqlstr in varchar2)
cur_handle integer;
begin
cur_handle := dbms_sql.open_cursor;
dbms_sql.parse(cur_handle,sqlstr, dbms_sql.native);
dbms_sql.execute(cur_handle); -- v8 only, not necessary in v7
end;
/
Hth,
Sybrand Bakker, Oracle DBA Received on Thu May 04 2000 - 00:00:00 CEST