Search notes:

Oracle: Reading fixed-field-length files with external tables

create table ext_table_fixed (
   field_1 char( 4),
   field_2 char(30)
)
organization external (
   type    oracle_loader
   default directory ext_dir
   access  parameters (
     records delimited by newline
     fields (
       field_1 position(1: 4) char( 4),
       field_2 position(5:30) char(30)
    )
  )
  location ('data.fld')
)
reject limit unlimited;
The file content is
B000Albert
B001Basil
B002Caesar
B003Darius
Apparently, the file must be stored with DOS line endings for this example to work.

See also

Reading CSV files

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758200330, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/objects/tables/external/fixed-field-length(61): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78