Iam running this on client machine and have created one director by name 'DEEPS' and have given read/write privileges ran the below quries for setting path.
If i cannot run this porcedure on client machine. please help me for reading data from .txt file and updating into database with out using UTL packages.
Please help
Expand|Select|Wrap|Line Numbers
- create or replace procedure utl_file_test_read (
- direc in varchar2,
- filename in varchar2)
- is
- input_file utl_file.file_type;
- input_buffer varchar2(4000);
- begin
- input_file := utl_file.fopen(direc ,filename, 'R');
- loop
- utl_file.get_line(input_file,input_buffer);
- insert into SampleTable values (input_buffer);
- c := c + 1;
- end loop;
- exception
- when NO_DATA_FOUND then
- utl_file.fclose( input_file);
- end;