Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to ensure that date column length is 19 in oracle table in the destination table

nkandwalAug 25 2015 — edited Aug 25 2015

Hi I am reading data from flat file using external table and then loading it to a destination table from the external table.

the column is defined in the external table( USAGE_EXT) as DATE_TIME   DATE when query for the length it shows me as as indicated below

select max(length(DATE_TIME))from USAGE_EXT -- the result is 19 for this query

now I am loading this date to the custom table (SUMMARY_HOURLY_NCIS) where the column is S_DATETIME  DATE

after the date is loaded the error log shows as

Sql Error Code(WHEN OTHERS) : -1438 Sql Error Message: ORA-01438: value larger than specified precision allowed for this column

select max(length(s_DATETIME))from  SUMMARY_HOURLY_NCIS  -- the result is 9 for this query

this is not making sense as both have been defined as DATE column in the source table ( USAGE_EXT) and the destination table (SUMMARY_HOURLY_NCIS)

the error log as I mentioned says

Sql Error Code(WHEN OTHERS) : -1438 Sql Error Message: ORA-01438: value larger than specified precision allowed for this column

although 2 records did get loaded

6/30/2015 11:59:59 PM

6/30/2015 11:59:59 PM

rest appeared in error log

Please help!!

SURPRISINGLY THE LOAD WENT JUST FINE PREVIOUSLY WITH NOTHING APPEARING IN THE ERROR_LOG...while testing I had simple deleted the data and rerun the load process from source to destination today that is where I saw this error

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 22 2015
Added on Aug 25 2015
50 comments
5,908 views