dbTalk Databases Forums  

ORA-01406 fetched column value was truncated

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss ORA-01406 fetched column value was truncated in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
jodleren
 
Posts: n/a

Default ORA-01406 fetched column value was truncated - 04-15-2009 , 09:53 AM






Hello

When reading a double from a table, I get this error:
ORA-01406 fetched column value was truncated

The desciption is:

ORA-01406 fetched column value was truncated
Cause: In a host language program, a FETCH operation was forced to
truncate a character string. The program buffer area for this column
was not large enough to contain the entire string. The cursor return
code from the fetch was +3.
Action: Increase the column buffer area to hold the largest column
value or perform other appropriate processing.

The problem is that it is a working database in 3+ copies, so I cannot
really go an change things. And I cannot even see where it is wrong,
except that it is a numver of places.

The error occures when
select workingtime (double, size 15) from sdfgsdfgf where department =
'CNCMILL'

When selecting other departments, the error might be there, it might
not. The error might also come when scrolling data.

I would apriciate to fix my SQL, not the database.... as I have no
idea what might happen elsewhere if I do so...

WBR
Sonnich

Reply With Quote
  #2  
Old   
ddf
 
Posts: n/a

Default Re: ORA-01406 fetched column value was truncated - 04-15-2009 , 11:53 AM






On Apr 15, 9:53*am, jodleren <sonn... (AT) hot (DOT) ee> wrote:
Quote:
Hello

When reading a double from a table, I get this error:
ORA-01406 fetched column value was truncated

The desciption is:

ORA-01406 fetched column value was truncated
* * Cause: In a host language program, a FETCH operation was forced to
truncate a character string. The program buffer area for this column
was not large enough to contain the entire string. The cursor return
code from the fetch was +3.
* * Action: Increase the column buffer area to hold the largest column
value or perform other appropriate processing.

The problem is that it is a working database in 3+ copies, so I cannot
really go an change things. And I cannot even see where it is wrong,
except that it is a numver of places.

The error occures when
select workingtime (double, size 15) from sdfgsdfgf where department =
'CNCMILL'

When selecting other departments, the error might be there, it might
not. The error might also come when scrolling data.

I would apriciate to fix my SQL, not the database.... as I have no
idea what might happen elsewhere if I do so...

WBR
Sonnich
Nothing in the error message text said to fix anything in the
database:

"Cause: In a host language program, a FETCH operation was forced to
truncate a character string. "

"In a host language program", meaning C++, Java, Visual Basic, ADA,
Pascal, etc. No mention was made of anything in the database
generating this error.

It's likely not your SQL that's the cause, it's the program buffer
area that's the issue so you need to understand how the language
you're using is allocating buffer space and find a way to increase
that space to prevent a truncation of data. Possibly your variable
declarations aren't large enough. Something in your *program* needs
to change.


David Fitzjarrell


Reply With Quote
  #3  
Old   
jodleren
 
Posts: n/a

Default Re: ORA-01406 fetched column value was truncated - 04-20-2009 , 01:42 AM



Just to clear up things and fir someone in the future:


The problem was that I was reading from views, where in one there
was: field_a/field_b and sometimes field_b would be 0, causing a
Division by 0 error.

That resulted in this errors.

WBR
Sonnich



On Apr 15, 5:53*pm, jodleren <sonn... (AT) hot (DOT) ee> wrote:
Quote:
Hello

When reading a double from a table, I get this error:
ORA-01406 fetched column value was truncated

The desciption is:

ORA-01406 fetched column value was truncated
* * Cause: In a host language program, a FETCH operation was forced to
truncate a character string. The program buffer area for this column
was not large enough to contain the entire string. The cursor return
code from the fetch was +3.
* * Action: Increase the column buffer area to hold the largest column
value or perform other appropriate processing.

The problem is that it is a working database in 3+ copies, so I cannot
really go an change things. And I cannot even see where it is wrong,
except that it is a numver of places.

The error occures when
select workingtime (double, size 15) from sdfgsdfgf where department =
'CNCMILL'

When selecting other departments, the error might be there, it might
not. The error might also come when scrolling data.

I would apriciate to fix my SQL, not the database.... as I have no
idea what might happen elsewhere if I do so...

WBRSonnich


Reply With Quote
  #4  
Old   
joel garry
 
Posts: n/a

Default Re: ORA-01406 fetched column value was truncated - 04-20-2009 , 05:30 PM



On Apr 19, 11:42*pm, jodleren <sonn... (AT) hot (DOT) ee> wrote:
Quote:
Just to clear up things and fir someone in the future:

The problem was that I was reading from views, where in one there
was: *field_a/field_b and sometimes field_b would be 0, causing a
Division by 0 error.

That resulted in this errors.

WBR
Sonnich

On Apr 15, 5:53*pm, jodleren <sonn... (AT) hot (DOT) ee> wrote:



Hello

When reading a double from a table, I get this error:
ORA-01406 fetched column value was truncated

The desciption is:

ORA-01406 fetched column value was truncated
* * Cause: In a host language program, a FETCH operation was forcedto
truncate a character string. The program buffer area for this column
was not large enough to contain the entire string. The cursor return
code from the fetch was +3.
* * Action: Increase the column buffer area to hold the largest column
value or perform other appropriate processing.

The problem is that it is a working database in 3+ copies, so I cannot
really go an change things. And I cannot even see where it is wrong,
except that it is a numver of places.

The error occures when
select workingtime (double, size 15) from sdfgsdfgf where department =
'CNCMILL'

When selecting other departments, the error might be there, it might
not. The error might also come when scrolling data.

I would apriciate to fix my SQL, not the database.... as I have no
idea what might happen elsewhere if I do so...

WBRSonnich
Sounds like you need a database constraint to disallow those zeros.

jg
--
@home.com is bogus.
xkcd in nyt: http://www.nytimes.com/2009/04/20/bu...ia/20link.html



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.