oracle - ORA-00933: SQL command not properly ended : When I try to execute INSERT -
i have procedure, inside of it, tried execute "insert", sending error can give me hint solve error? tried read oracle documentation figure out i'm wrong, far have not found can me.
create or replace procedure read_file begin declare v1 varchar2(200); f1 utl_file.file_type; emptylines number(10):=0; read_lines number(10):=0; alarm_counter number(10):=0; begin --deschidere fisier f1 := utl_file.fopen('oncioiu','text.txt','r'); --itinerare fiecare linie din fisierul text loop begin utl_file.get_line(f1,v1); read_lines := read_lines+1; dbms_output.put_line(v1); -- determine number of empty rows if v1 null emptylines :=emptylines+1; end if; -- determine number of alarms if emptylines =2 alarm_counter :=alarm_counter+1; end if; insert alarms (id) values(alarm_counter) exception when no_data_found exit; end; end loop; dbms_output.put_line(v1); dbms_output.put_line('numar de linii citite '||read_lines); dbms_output.put_line('numar de randuri goale '||emptylines); dbms_output.put_line('numar de alarme '||alarm_counter); -- close file utl_file.fclose(f1); end; end; /
Comments
Post a Comment