1 Reply Latest reply: Nov 20, 2012 8:18 PM by rp0428 RSS

    generating packge

    973390
      hi everybody

      i created a BD in oracle with sql devloper and i have generate a package that when i want compile to save it , oracle devloper show that i have a problem but i dn't know what is
      create or replace
      PACKAGE PK_FILM AS
      type FILM_tapi_rec
      IS
      record
      (
      genre FILM.genre%type ,
      anneeRealisation FILM.anneeRealisation%type ,
      idRealis FILM.idRealis%type ,
      codeFilm FILM.codeFilm%type ,
      titre FILM.titre%type );
      type FILM_tapi_tab
      IS
      TABLE OF FILM_tapi_rec;
      -- insert
      PROCEDURE ins(
      p_genre IN FILM.genre%type DEFAULT NULL ,
      p_anneeRealisation IN FILM.anneeRealisation%type DEFAULT NULL ,
      p_idRealis IN FILM.idRealis%type DEFAULT NULL ,
      p_codeFilm IN FILM.codeFilm%type ,
      p_titre IN FILM.titre%type DEFAULT NULL );
      -- update
      PROCEDURE upd(
      p_genre IN FILM.genre%type DEFAULT NULL ,
      p_anneeRealisation IN FILM.anneeRealisation%type DEFAULT NULL ,
      p_idRealis IN FILM.idRealis%type DEFAULT NULL ,
      p_codeFilm IN FILM.codeFilm%type ,
      p_titre IN FILM.titre%type DEFAULT NULL );
      -- delete
      PROCEDURE del(p_codeFilm IN FILM.codeFilm%type );
      END PK_FILM ;

      create OR REPLACE PACKAGE body PK_FILM
      IS
      -- insert
      PROCEDURE ins(
      p_genre IN FILM.genre%type DEFAULT NULL ,
      p_anneeRealisation IN FILM.anneeRealisation%type DEFAULT NULL ,
      p_idRealis IN FILM.idRealis%type DEFAULT NULL ,
      p_codeFilm IN FILM.codeFilm%type ,
      p_titre IN FILM.titre%type DEFAULT NULL )
      IS
      BEGIN
      INSERT
      INTO FILM
      (
      genre ,
      anneeRealisation ,
      idRealis ,
      codeFilm ,
      titre
      )
      VALUES
      (
      p_genre ,
      p_anneeRealisation ,
      p_idRealis ,
      p_codeFilm ,
      p_titre
      );
      END;
      -- update
      PROCEDURE upd
      (
      p_genre IN FILM.genre%type DEFAULT NULL ,
      p_anneeRealisation IN FILM.anneeRealisation%type DEFAULT NULL ,
      p_idRealis IN FILM.idRealis%type DEFAULT NULL ,
      p_codeFilm IN FILM.codeFilm%type ,
      p_titre IN FILM.titre%type DEFAULT NULL
      )
      IS
      BEGIN
      UPDATE FILM
      SET genre = p_genre ,
      anneeRealisation = p_anneeRealisation ,
      idRealis = p_idRealis ,
      titre = p_titre
      WHERE codeFilm = p_codeFilm;
      END;
      -- del
      PROCEDURE del(
      p_codeFilm IN FILM.codeFilm%type )
      IS
      BEGIN
      DELETE FROM FILM WHERE codeFilm = p_codeFilm;
      END;
      END PK_FILM;


      ==> the exception by oracle is : Erreur(33,1): PLS-00103: Symbole "CREATE" rencontré

      help plz ^^
        • 1. Re: generating packge
          rp0428
          Welcome to the forum!

          Whenever you post provide your 4 digit Oracle version and the full version of sql developer you are using. And when you post code you need to put \
           on the line before and on the line after your code. Please edit your code and add these code tags and then paste in the formatted code. The code tags will preserver the formatting to make the code readable.
          {quote}
          i created a BD in oracle 
          {quote}
          There is no such thing as a BD in Oracle.
          
          How are you trying to execute the code you posted?
          
          You need to provide a / separator between the package spec and the package body.
          
          Or execute the package spec and body separately and post any errors you are getting for each.