-
Ora-1406 Very Very Urgent!!
Hi All,
I need ur help again and the need is very very urgent. Iam using Oracle 9i and my issue with Oracle is as below..
I had written a procedure sometime back wherin I first declare a cursor then use "cursor for loop" to insert the fetched rows to a table. The procedure was working well all this time in production but suddenly from past two days I have been facing the error ORA-1406 FETCHED COLUMN VALUE WAS TRUNCATED. Could anyone please help me on this issue.
Further, I checked the problem by writing some log statements in the procedure. I could see that, the control passed into the loop and executed the first loop, made an insert in the tble and then failed with the error at the beginning of the second loop before the loop could actually start.
The only most recent change I have done is that I have changed the feild width and variable type( from number(5,0) to varchar2(20)) in the source table(From clause of CURSOR SELECT query) in my instance. Could this be a reason for this error?
Please let me know. Thanks in advance
Last edited by rohikesh; 04-07-2006 at 12:35 PM.
-
Why don't to post the code - or at least the cursor and the begining of the loop?
"The power of instruction is seldom of much efficacy except in those happy dispositions where it is almost superfluous" - Gibbon, quoted by R.P.Feynman
-
Originally Posted by rohikesh
The only most recent change I have done is that I have changed the feild width and variable type( from number(5,0) to varchar2(20)) in the source table(From clause of CURSOR SELECT query) in my instance. Could this be a reason for this error?
Hmmmm
Jeff Hunter
-
Originally Posted by marist89
Hmmmm
Now Jeff, I hope you aren't suggesting that just because a column width was changed that it caused that procedure to break. Its not like he hard coded his cursor variables to be specific types and then used an explicit cursor to select into them, or did he???
-
Well, he says he's using a "cursor for loop" - which types everything implicitly.
"The power of instruction is seldom of much efficacy except in those happy dispositions where it is almost superfluous" - Gibbon, quoted by R.P.Feynman
-
Hi All,
I tried running the code with settings as below...
Old Cursor used ..
cursor c1 is
select x from tab1;
old source table field width..
x varchar2(8);
new source table field width after the change..
x varchar2(20);
To run the code I did the following..
New Cursor Change
cursor c1 is
select substr(x,1,20) from tab1;
If I run the code with the above change in cursor it works successfully without 1406 error.
Could anyone tell me what might be the cause??
Thanks in advance..
Last edited by rohikesh; 04-08-2006 at 05:51 AM.
-
Originally Posted by DaPi
Why don't to post the code - or at least the cursor and the begining of the loop?
Can we see the rest?
"The power of instruction is seldom of much efficacy except in those happy dispositions where it is almost superfluous" - Gibbon, quoted by R.P.Feynman
-
I was merely implying that if
1. it worked before
2. you changed something
3. now it doesn't work
your change broke it.
Jeff Hunter
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|