Procedure to inster into a table
I need to create a procedure to insert the result of a query into a table, so that then i can schedule it to run every night
i have done
create or replace procedure crpdta.dbms_p_cargaVentas
as
begin
truncate table crpdta.tmp_est_ventas;
insert into crpdta.tmp_est_ventas(
select * from crpdta.f00001 where ilkco='100' and ildoco='0000245'');
end;
but it is not working i keep getting error on line 2 column 17 but my line 2 only has two columns
Any help regarding this will be appreciated
Or if there is another way to acomplish my task please le met know