DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: error adding a column

  1. #1
    Join Date
    Jun 2001
    Posts
    45
    The code is

    DECLARE
    message VARCHAR(30);
    BEGIN
    message := 'Welcome to the Oracle World';
    EXECUTE IMMEDIATE 'alter table emp add Desc_ription varchar(30)';

    UPDATE emp
    SET desc_ription = message;

    COMMIT;
    END;

    I get the following error.

    ORA-06550: line 6, column 26:
    PLS-00417: unable to resolve "DESC_RIPTION" as a column
    ORA-06550: line 6, column 1:
    PL/SQL: SQL Statement ignored

  2. #2
    Join Date
    Oct 2000
    Location
    Charlotte, USA
    Posts
    330
    Hi why don't you continue with the same thread....which is just below this for the same issue by YOU PROGRAMMER.
    Donot tell me to be quite like you said in that thread.
    People like us really awaiting for the help keeping fingers crossed are getting affected because of this kind of duplicating thread.
    I am sorry if it affend you.
    Thanks.
    Thanigaivasan.

  3. #3
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,684
    Check your syntax manually and you'll see:

    EXECUTE IMMEDIATE 'alter table emp add Desc_ription varchar(30)';

    should be:

    EXECUTE IMMEDIATE 'alter table emp add (Desc_ription varchar(30))';

    Cheers
    Tim...
    OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
    OCA PL/SQL Developer
    Oracle ACE Director
    My website: oracle-base.com
    My blog: oracle-base.com/blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width