6 Replies Latest reply on Jan 2, 2013 5:06 PM by ranit B

    testing creating a procedure to truncate and insert data.

      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
      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;