Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

external table problem with final null field terminated by ','

903628Feb 20 2012 — edited Feb 22 2012
Hi,

I'm creating the following external table which has historically been working fine;
external table
              CREATE TABLE summit.cbs5s803_work (w5s803_account_no          VARCHAR2(20),
                                                 w5s803_from_company_code   NUMBER(3),
                                                 w5s803_to_company_code     NUMBER(3),
                                                 w5s803_from_sec_pool       VARCHAR2(6),
                                                 w5s803_to_sec_pool         VARCHAR2(6))
              ORGANIZATION EXTERNAL (TYPE ORACLE_LOADER DEFAULT DIRECTORY USRTMP
                                     ACCESS PARAMETERS (FIELDS TERMINATED BY ',')
                                     LOCATION ('CBS5S803A_WORK.dat'))
                                     REJECT LIMIT 0;
However, the following file was loaded and it fell over. The problem appears to be that the final field is null, which it never has been before;
csv file:-
14974416,1,6,,
I could modify the external table parameters slightly to include missing values as null, like so;
ACCESS PARAMETERS (FIELDS TERMINATED BY ','
                                     MISSING FIELD VALUES ARE NULL )
however i would rather understand why it doesn't accept the ',,' at the end of a line in a csv?

Thanks in advance


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 21 2012
Added on Feb 20 2012
4 comments
678 views