title: External Tables - "partial record at end of file" error when using FIXED
body: <p>I am getting a <strong>"partial record at end of file"</strong> error when using FIXED parameter with External Tables.</p>
  
  <p>I am using SQL Developer, Oracle 11g XE. </p>
  
  <pre><code>-------
  foo.dat - Field lengths: fname=7;lname=8;year=4
  -------
  Alvin  Tolliver1976
  KennethBaer    1963
  Mary   Dube    1973 
  </code></pre>
  
  <p>Here is the DDL for the table:</p>
  
  <pre><code>CREATE TABLE emp_load (
      first_name CHAR(7)
      , last_name CHAR(8)
      , year_of_birth CHAR(4)
  )
    ORGANIZATION EXTERNAL (
       TYPE ORACLE_LOADER 
       DEFAULT DIRECTORY ext_tab_dir
       ACCESS PARAMETERS (
             RECORDS FIXED 20 FIELDS (
                 first_name CHAR(7)
                 , last_name CHAR(8)
                 ,  year_of_birth CHAR(4)
                 )
        )
        LOCATION ('foo.dat'));
  </code></pre>
  
  <p>The table emp_load is getting created, but select statement fails with below error message.
  Error message when doing <code>select * from emp_load</code> :</p>
  
  <pre><code>ORA-29913: error in executing ODCIEXTTABLEFETCH callout
  ORA-29400: data cartridge error
  KUP-04018: &lt;b&gt;partial record at end of file C:\oracle\foo.dat&lt;/b&gt;
  29913. 00000 -  "error in executing %s callout"
  *Cause:    The execution of the specified callout caused an error.
  *Action:   Examine the error messages take appropriate action.
  </code></pre>
  
  <p>The only time it worked is when I made foo.dat 1 line (as below) and I changed the FIXED length to 19- </p>
  
  <pre><code>Alvin  Tolliver1976KennethBaer    1963Mary   Dube    1973
  </code></pre>
  
  <p>This seems to indicate that I am doing something wrong with regards to newline characters, but I cannot figure out what. </p>
  
  <p>Any help would be appreciated. Thanks in advance!</p>