6 Replies Latest reply: Jan 2, 2013 11:06 AM by ranit B RSS

    testing creating a procedure to truncate and insert data.

    hh*394375*91
      I wanted to creat a procedure to truncate a table and then insert data into it.

      My procedure works until I put a truncate statement in it.


      I get the error message
      Error(4,10): PLS-00103: Encountered the symbol "TABLE" when expecting one of the following: := . ( @ % ; The symbol ":= was inserted before "TABLE" to continue.


      Can you not do this in a procedure.

      This is the code I was using to test this...

      create or replace
      procedure hall_test
      is
      begin
      truncate table hr.hall_countries;
      insert into hr.hall_countries (country_id,country_name,region_id)
      select country_id,country_name,region_id from hr.countries;
      end;

      Howard