Skip to Main Content
  • Questions
  • HOW TO RESOLVE THE ERROR :- ora-01406 fetched column value was truncated

Breadcrumb

Question and Answer

Chris Saxon

Thanks for the question, PRASHANT.

Asked: June 21, 2016 - 9:30 am UTC

Last updated: September 27, 2018 - 2:01 pm UTC

Version: 11G

Viewed 10K+ times! This question is

You Asked

HOW TO RESOLVE THE ERROR :- ora-01406 fetched column value was truncated

and Chris said...

HOW TO ASK A QUESTION:

1. Provide a detailed description of your problem. Include an overview of what you're trying to do. The steps you took that lead to the error. And anything you've tried to solve the issue.

2. Post a complete test case showing your problem. This is something we can copy-paste into our environment to reproduce your issue. This includes tables, data and anything else necessary for us to run your code (without editing it!)

3. DON'T SHOUT!

Anyway, on to the error. As the error implies, the value from a column has been shortened. To solve this, as the docs say

"Use the right data types to avoid truncation."

https://docs.oracle.com/en/database/oracle/oracle-database/18/errmg/ORA-00910.html#GUID-D9EBDFFA-88C6-4185-BD2C-E1B959A97274__GUID-4101690C-8DFD-4EF9-A5B5-63A6507C00EB

So you need to look at your code. The problem happens when there's a mismatch between the variable data type and the data type of the column.

To help you further, please provide the information from steps 1 & 2 above.

Thanks!



Rating

  (2 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Very good

Ghassan, June 22, 2016 - 5:14 am UTC

Excellent answer.

Link is out of date.

A reader, September 27, 2018 - 1:28 pm UTC

Link is out of date.
Chris Saxon
September 27, 2018 - 2:01 pm UTC

Thanks, fixed.

More to Explore

SQL

The Oracle documentation contains a complete SQL reference.