Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Perplexing ORA-01461
Haximus wrote:
> "Daniel Morgan" <damorgan_at_x.washington.edu> wrote in message > news:1071259254.443540_at_yasure... >
> > ORA-01461 >
> > a >>>>end;
>>>>>LONG column." The perplexing part is none of the columns in the table
>>>
>>>being
>>>
>>>
>>>>>inserted are defined as LONG, nor are any of the variables I'm using.
>>>
>>>I've
>>>
>>>
>>>>>searched metalink and tried some of the suggested fixes but no joy.
>>>>
>>>>How about CLOB? BLOB? etc? What data types do you have?
>>>
>>>
>>>This is the table definition itself:
>>>
>>>--- snip ---
>>>create global temporary table tree (
>>> id number not null primary key,
>>> parent_id number,
>>> rid rowid,
>>> seq number,
>>> selected char(1),
>>> type char(1),
>>> state number,
>>> label varchar(100),
>>> value number,
>>> block varchar(30),
>>> item varchar(30),
>>> branch varchar(100),
>>> options varchar(10),
>>> expr1 varchar(1000),
>>> expr2 varchar(1000),
>>> expr3 varchar(1000),
>>> check ( type in ('F','R') ),
>>> check ( state between -1 and 1 )
>>>)
>>>on commit preserve rows;
>>>--- unsnip ---
>>>
>>>The offending code looks something like this (edited for brevity);
>>>
>>>--- snip ---
>>>procedure insert_node(pnode tree%rowtype) is
>>> cnode tree%rowtype;
>>>begin
>>> -- assign some values to pnode
>>> select seq.nextval into cnode.id;
>>> cnode.parent_id := pnode.id;
>>> cnode.type := 'F';
>>> cnode.selected := 'N';
>>> cnode.state := 0;
>>> ...
>>> insert into tree values (cnode); -- <<<< this is where the ORA-01461
>>>occurs
>>> ...
> > > Hi, thanks for the reply. > > I tried renaming the column identifiers that were reserved words but still > same problem. I went back to metalink and did some more research. It turns > out I encountered bug #3148927, which results in an ora-01461, caused on the > client side (Forms in my case) when you try to insert a null into a varchar > column after consecutive inserts of non-null values into the same column. > The bug has not been patched or resolved yet, so it looks like I will need > to "hack" a fix for now. > > Regards
Try NVL(some_value, '') and see if that works. The end result should be the same but it may not hit the bug. I'll be interested in knowing if it works.
-- Daniel Morgan http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Wed Dec 17 2003 - 17:06:17 CST