Link to home
Start Free TrialLog in
Avatar of Vincent Costanza
Vincent CostanzaFlag for United States of America

asked on

How to modify a external talbe column type

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.?
SOLUTION
Avatar of isaackhazi
isaackhazi

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Vincent Costanza

ASKER

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...
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
ASKER CERTIFIED SOLUTION
Avatar of Sujith
Sujith
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks for you help... I now have the external table created... check out my new question..
https://www.experts-exchange.com/questions/24232908/Move-data-from-one-external-table-to-two-tables-conditionally.html