Load missing data in SQL Loader [message #15135] |
Wed, 22 September 2004 05:22  |
Pinki
Messages: 5 Registered: September 2004
|
Junior Member |
|
|
I have to load data from a csv file to my staging table using SQL loader. Here are a few lines of my data file:
Field names:
date_time,field2,order_num,curr_date_time.
2004-09-07 00:02:13,-,3002109,2004-09-07 00:02:13
2004-09-07 00:01:13,-,3012109,2004-09-07 00:01:13
2004-09-07 00:12:13,-,1002109,2004-09-07 00:12:13
-,-,1002109,-
2004-09-07 02:12:13,-,5002109,2004-09-07 02:12:13
The first column(date field) is the date and time field(date_time).
The second column(varchar2(1)) is a field which had a '-' in it's place(field2).
The third column(number(10) is an order number field.(order_num).
The fourth column(date field) is the current date and time field(curr_date_time).
In the SQL loader control file all the data is getting loaded into the staging table except the date fields. Is there a syntax that I could load the '-' for missing date fields? I am loading the data from SQL server to Oracle database. The date format on the SQL server side is "mm/dd/yyyy hh24:mi:ssam" (the date has an am/pm at the end). In my staging table the date field is varchar2(21) since the date field length is 21 characters on the SQL server. How should I define the date column in my staging table, view and the control file to load all the data fileds?
Please advise.
|
|
|
|
|