Hell hthukral
If you are not going to store data into DB I think it is not a good idea to use SQL for this. Use some script languages, Java, .NET or whatever.
If you want to practice you have to use DBMS_XML* packages. Documentation is here - Packages and Types Reference - here's the contents
http://www.oracle.com/pls/
Good luck
I
Main Topics
Browse All Topics





by: schwertnerPosted on 2005-10-20 at 00:46:14ID: 15122355
For reading files into buffer use:
v','56789. txt', 'r');
njeev);
e THEN ... UTL_File.Fclose(sasha); THEN ... UTL_File.Fclose(sasha);
;
procedure YOUR_PROC is
sasha SYS.UTL_FILE.FILE_TYPE;
sanjeev VARCHAR2(1800);
begin
sasha := UTL_File.Fopen('D:\staff\c
LOOP
UTL_File.get_line(sasha,sa
-- FORMAT THE DATA in/from buffer sanjeev and insert in Oracle DB using INSERT statement
END LOOP
EXCEPTION
WHEN no_data_found THEN
UTL_File.Fclose(sasha);
WHEN UTL_File.invalid_filehandl
-- invalid_filehandle - not a valid file handle
WHEN UTL_File.read_error THEN ... UTL_File.Fclose(sasha);
-- OS error occurred during read
WHEN UTL_File.invalid_operation
end YOUR_PROC ;
REMARK
Server security for PL/SQL file I/O consists of a restriction on the directories that can be accessed.
Accessible directories must be specified in the
instance parameter initialization file (INIT.ORA).
Specify the accessible directories for the UTL_FILE
functions in the initialization file
using the UTL_FILE_DIR parameter.
For example:
UTL_FILE_DIR = <directory name>
like in
UTL_FILE_DIR = C:\DATA\ORACLE\DATAFILES
Starting from 9i you can use Oracle directories instead:
create or replace directory XMLDIR as 'E:\ICW_TASKS\XML\SOURCE\'
grant read on directory xmldir to my_user with grant option;