How do I modify a external tables column type to the Date type...
How to insure that the date is in the correct format so that the imported date ends up in the Date column.?
its a external table and I am using this statment to create the table...
SQL> create table Tier_Pricing_xtern
( comid_id NUMBER(10,0),
Dealer NUMBER(15,5),
Comm_Vendor NUMBER(15,5),
T1 NUMBER(15,5),
T2 NUMBER(15,5),
T3 NUMBER(15,5),
T4 NUMBER(15,5),
S_Dt DATE,
E_Dt DATE
)
organization external
( default directory xtern_Tierdata_dir
access parameters
( records delimited by newline
fields terminated by ','
)
location ('Tier_Pricing.csv')
);
The date in the csv looks like this...
100,135.58,119.63,102,88,66,57,3/15/2009,3/22/2009
The log file created shows this....
error processing column S_DT in row 1 for datafile E:\SHILOH\IMPORTS\TierP\Tier_Pricing.csv
ORA-01722: invalid number
When I first created the table the date columns were created in number format. The table now shows the date fomat for those columns.... not sure what I did wrong here...
Vincent Costanza
ASKER
Now I am getting this error...
error processing column S_DT in row 1 for datafile E:\SHILOH\IMPORTS\TierP\Tier_Pricing.csv
ORA-01861: literal does not match format string
SQL> create table Tier_Pricing_xtern
( comid_id NUMBER(10,0),
Dealer NUMBER(15,5),
Comm_Vendor NUMBER(15,5),
T1 NUMBER(15,5),
T2 NUMBER(15,5),
T3 NUMBER(15,5),
T4 NUMBER(15,5),
S_Dt DATE,
E_Dt DATE
)
organization external
( default directory xtern_Tierdata_dir
access parameters
( records delimited by newline
fields terminated by ','
)
location ('Tier_Pricing.csv')
);
The date in the csv looks like this...
100,135.58,119.63,102,88,6
The log file created shows this....
error processing column S_DT in row 1 for datafile E:\SHILOH\IMPORTS\TierP\Ti
ORA-01722: invalid number
When I first created the table the date columns were created in number format. The table now shows the date fomat for those columns.... not sure what I did wrong here...