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

Thread: Error - Identifier must be declared

Threaded View

  1. #5
    Join Date
    May 2003
    Posts
    49
    Dapi,

    That has sorted it. Thanks for all your help really, really appreciated!

    Code:
    CREATE OR REPLACE PROCEDURE Set_Sequences (pk_name IN VARCHAR2, table_name IN VARCHAR2) IS
    max_pk NUMBER;
    
    BEGIN
    EXECUTE IMMEDIATE ('SELECT max('|| pk_name ||') From ' || table_name) INTO max_pk;
    
    EXECUTE IMMEDIATE ('drop sequence ' || pk_name);
    
    EXECUTE IMMEDIATE ('create sequence ' || pk_name || ' start with ' || max_pk || ' increment by 1 minvalue 1 nocycle cache 20 noorder');
    
    COMMIT;
    END;
    Thanks for the link to the user guide, will come in handy in the future.

    Cheers Al
    Last edited by Running Bear; 10-15-2003 at 12:29 PM.

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