Avatar of Vincent Costanza
Vincent Costanza
Flag 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.?
Oracle DatabaseEnterprise Software

Avatar of undefined
Last Comment
Vincent Costanza

8/22/2022 - Mon
SOLUTION
isaackhazi

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
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...
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
ASKER CERTIFIED SOLUTION
Sujith

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Vincent Costanza

ASKER
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 
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck