This discussion is archived
4 Replies Latest reply: Dec 31, 2012 3:51 PM by Srini Chavali-Oracle RSS

sql loader help

852469 Newbie
Currently Being Moderated
options (skip = 1)
LOAD DATA
INFILE 'D:\load\Invoices_.csv'
truncate INTO TABLE invoices
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' trailing nullcols
(
INVOICE_ID ,
MSP_INVOICE_ID ,
WORK_ORDER_ID ,
REVISION_NO ,
INVOICE_LINE_ITEM_ID ,
PARENT_INVOICE_ID ,
SUPPLIER ,
BUSINESS_UNIT ,
PARENT_BUSINESS_UNIT ,
SITE ,
INVOICE_TYPE ,
INVOICE_LINE_ITEM_TYPE ,
WORKER ,
WORKER_START_DATE "to_date(:worker_start_date,'DD/MM/YYYY')",
WORKER_END_DATE "to_date(:WORKER_END_DATE,'DD/MM/YYYY')",
INVOICE_STATUS ,
INVOICE_LINE_ITEM_DATE "to_date(:INVOICE_LINE_ITEM_DATE,'DD/MM/YYYY')",
INVOICE_APPROVED_DATE "to_date(:INVOICE_APPROVED_DATE,'DD/MM/YYYY')",
INVOICE_PAID_DATE "to_date(:INVOICE_PAID_DATE,'DD/MM/YYYY')",
CURRENCY ,
INVOICE_AMOUNT ,
SUPP_INVOICE_AMOUNT ,
MSP_INVOICE_AMOUNT ,
INVOICE_AMOUNT_WITH_TAX ,
SUPP_INVOICE_AMOUNT_WITH_TAX ,
MSP_AMOUNT_WITH_TAX ,
INVOICE_TAX_ADJ_AMOUNT ,
SUPPLIER_TAX_COMPONENT ,
MSP_TAX_COMPONENT
)

data loaded successfully but 1st column is null but in the csv value is present(varchar2).
how could i resolve it.
  • 1. Re: sql loader help
    user639304 Explorer
    Currently Being Moderated
    Hi,

    Could you show us the data file, or at least the first lines of it?
  • 2. Re: sql loader help
    852469 Newbie
    Currently Being Moderated
    BPCD00016235     BPCD00016235MSP     BPWO00008885     1     BPTS00303482     BPIN00277436     NextSource Inc.     GCR Operations; BP Exploration & Production Inc.; USA     GCR Operations     US-LA-New Orleans-Poydras     Credit/Debit Memo     Time Sheet     Moller, Giselle     1/12/2011     30/06/2013     Pending Approval (Level 1)     27/10/2012               USD     251.28     246.24     5.04     251.28     246.24     5.04     0
  • 3. Re: sql loader help
    852469 Newbie
    Currently Being Moderated
    we have noticed box symbol appeared before the character

    please let me know how could i handle this.
  • 4. Re: sql loader help
    Srini Chavali-Oracle Oracle ACE Director
    Currently Being Moderated
    Pl post OS and database versions, a description of the table and the complete loader log file. What is the database characterset ? Are there any leading hidden special characters in the data file ?

    HTH
    Srini

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points