title: ORA-01401: inserted value too large for column CHAR
body: <p>I'm pretty new to SQL Oracle and my class is going over Bulk Loading at the moment. I pretty much get the idea however I am having a little trouble getting it to read all of my records.</p>
  
  <p>This is my SQL File;</p>
  
  <pre><code>PROMPT Creating Table 'CUSTOMER'
  CREATE TABLE CUSTOMER
  (CustomerPhoneKey CHAR(10) PRIMARY KEY
  ,CustomerLastName VARCHAR(15)
  ,CustomerFirstName VARCHAR(15)
  ,CustomerAddress1 VARCHAR(15)
  ,CutomerAddress2 VARCHAR(30)
  ,CustomerCity VARCHAR(15)
  ,CustomerState VARCHAR(5)
  ,CustomerZip VARCHAR(5)
  );
  </code></pre>
  
  <p>Quick and easy. Now This is my Control File to load in the data</p>
  
  <pre><code>LOAD DATA
  INFILE Customer.dat
  INTO TABLE Customer
  FIELDS TERMINATED BY"|"
  (CustomerPhoneKey, CustomerLastName, CustomerFirstName, CustomerAddress1 , CutomerAddress2, CustomerCity, CustomerState, CustomerZip)
  </code></pre>
  
  <p>Then the Data File</p>
  
  <pre><code>2065552123|Lamont|Jason|NULL|161 South Western Ave|NULL|NULL|98001
  2065553252|Johnston|Mark|Apt. 304|1215 Terrace Avenue|Seattle|WA|98001
  2065552963|Lewis|Clark|NULL|520 East Lake Way|NULL|NULL|98002
  2065553213|Anderson|Karl|Apt 10|222 Southern Street|NULL|NULL|98001
  2065552217|Wong|Frank|NULL|2832 Washington Ave|Seattle|WA|98002
  2065556623|Jimenez|Maria|Apt 13 B|1200 Norton Way|NULL|NULL|98003
  </code></pre>
  
  <p>The problem is, that only the last record</p>
  
  <pre><code>2065556623|Jimenez|Maria|Apt 13 B|1200 Norton Way|NULL|NULL|98003
  </code></pre>
  
  <p>is being loaded in. The rest are in my bad file</p>
  
  <p>So I took a look at my log file and the errors I'm getting are </p>
  
  <blockquote>
    <p>Record 1: Rejected - Error on table CUSTOMER, column CUSTOMERZIP.
    ORA-01401: inserted value too large for column</p>
    
    <p>Record 2: Rejected - Error on table CUSTOMER, column CUSTOMERZIP.
    ORA-01401: inserted value too large for column</p>
    
    <p>Record 3: Rejected - Error on table CUSTOMER, column CUSTOMERZIP.
    ORA-01401: inserted value too large for column</p>
    
    <p>Record 4: Rejected - Error on table CUSTOMER, column CUSTOMERZIP.
    ORA-01401: inserted value too large for column</p>
    
    <p>Record 5: Rejected - Error on table CUSTOMER, column CUSTOMERZIP.
    ORA-01401: inserted value too large for column</p>
    
    <p>Table CUSTOMER:   1 Row successfully loaded.   5 Rows not loaded due
    to data errors.   0 Rows not loaded because all WHEN clauses were
    failed.   0 Rows not loaded because all fields were null.</p>
  </blockquote>
  
  <p>Onto the question. I see that CustomerZip is the problem, and initially I had it as CHAR(5) -- I did this because my understanding of the data type, is that for numeric values like a zip code, I would not be doing arithmetic operations with it, so it would be better to store it as CHAR. Also I did not use VARCHAR2 (5) initially, because seeing as it is a zip code, I don't want the value to vary, It should always be 5. Now maybe I'm just misunderstanding this. So if there is anyone that can clear that up, that would be awesome.</p>
  
  <p>My second question, is "How do I fix this problem?" Given the above understanding of these data types, it doesn't make sense why CHAR(5) NOR VARCHAR2(5) work. As I am getting the same errors for both. </p>
  
  <p>It makes even less sense that one record(the last one) actually works.</p>
  
  <p>Thank you for the help in advance</p>