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

Breadcrumb

We're taking a break this week as Connor and Chris will both be at CloudWorld, the premier Oracle conference of 2024. If you're in Vegas, please come say Hi or pop into our sessions

Question and Answer

Chris Saxon

Thanks for the question, PRASHANT.

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

Last updated: September 05, 2024 - 1:10 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

  (3 ratings)

We're not taking comments currently, so please try again later if you want to add 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.

How we can find column name

A reader, September 05, 2024 - 7:28 am UTC

actually we are having 90 columns in the job how we can this this column only truncating.
Chris Saxon
September 05, 2024 - 1:10 pm UTC

Remove columns from the statement until you find which are causing the error.

More to Explore

SQL

The Oracle documentation contains a complete SQL reference.