Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Select with ORA-01401: inserted value too large for column Offset

Posted on 2008-11-15
10
Medium Priority
?
1,943 Views
Last Modified: 2013-11-11
Hi,
I get the following error on a oracle 11g database.

ORA-01401: inserted value too large for column Offset: 223

The used SQL is:
select distinct v0."LK" as "Lkey", TO_NUMBER(v2."Value") AS "Value" from b0 v0 inner join b0v v1 on (v1."Field"=100535 and v1."FK_LK"=v0."PK") left outer join b0v v2 on (v2."Field"=100464 and v2."FK_LK"=v0."PK") inner join ACLEntry acl5376 on (acl5376."FK_ACL"=v0."FK_ACL") WHERE ((((v1."Value"<>'notis manu torulos Caesar illustri donet vati veterum cudimus pueros Chonrade torulos pignus tacitis Chonrade viros Haec valeat pignus tessera Artificum pueros vati nomismata veterum notis cudimus scribere nos quisque Artificum dabo pignus donet valeat horis valeat manu iuglans Ipse ut pignus nos facta Et chartula scribere eximias Et valeat dabo iuglans scribere nomismata Et cudimus cudimus Dum chartacea Et quisque picta signaque tacitis mei vates vati figere Emblemata vates cudimus nomismata chartacea valeat iuvenes facta Caesar tibi fallit ut chartula mei petasis veterum tibi segnes pueros Quae segnes munera torulos eximias iuvenes manus horis Dum Caesar segnes figere pignus iuglans habere supremus vates horis Et Emblemata Dum illustri manu ut parmas illustri chartacea Haec pignus pueros festivis munera picta Detinet Artificum Chonrade chartula Detinet nos chartula Ipse manu supremus habere torulos torulos torulos Artificum veterum et notis eximias ut amoris chartula amoris horis pueros viros Emblemata iuvenes petasis segnes nos scribere figere chartula veterum notis Vestibus Quae ut manus scribere picta Haec habe At tacitis veterum' or v1."Value" is null)))) and ((acl5376."FK_Benutzer"=1 or acl5376."FK_Gruppe" IN (9 , 6 , 4 , 1 , 2 , 3 , 13 , 14)) and acl5376."Type"='r') and v0."histtop"='Y'  ORDER BY TO_NUMBER(v2."Value"), v0."LK" desc


The table description is:
SQL> describe b0v;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 PK                                        NOT NULL NUMBER
 FK_LK                                     NOT NULL NUMBER
 Field                                     NOT NULL NUMBER
 Value                                              NVARCHAR2(2000)

SQL> describe ACLEntry
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 PK                                        NOT NULL NUMBER
 FK_ACL                                    NOT NULL NUMBER
 FK_Gruppe                                          NUMBER
 FK_Benutzer                                        NUMBER
 Type                                               NCHAR(1)

SQL> describe b0;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 PK                                        NOT NULL NUMBER
 LK                                        NOT NULL NUMBER
 kzStatus                                  NOT NULL NCHAR(1)
 histtop                                   NOT NULL NCHAR(1)
 FirstEditor                               NOT NULL NUMBER
 FirstEditTime                             NOT NULL NUMBER
 Editor                                    NOT NULL NUMBER
 EditTime                                  NOT NULL NUMBER
 FK_ACL                                    NOT NULL NUMBER
 Deputy                                             NUMBER
 b0Type                                             NUMBER
 o1                                                 NUMBER
 o2                                                 NUMBER
 dt0v_alphanum_dm                                   NVARCHAR2(254)
 dt0v_num_dm                                        FLOAT(126)
 dt0v_datetime_dm                                   NUMBER
 dt0v_sselection_dm                                 NUMBER
 dt0v_urllink_dm                                    NVARCHAR2(254)
 dt0v_user_dm                                       NUMBER
 dt0v_date_dm                                       NUMBER
 dt0v_hlist_dm                                      NVARCHAR2(254)
 dt0v_extsel_dm                                     NUMBER
 dt0v_radio_dm                                      NUMBER
 dt0v_checkbox_dm                                   NVARCHAR2(254)
 dt0v_popup_dm                                      NVARCHAR2(254)
 dt0v_scrollwin_dm                                  NVARCHAR2(254)
 dt0v_picture_dm                                    NVARCHAR2(254)
 dt0v_file_dm                                       NVARCHAR2(254)
 dt0v_group_dm                                      NUMBER
 Multifile                                          BLOB
 dt0v_adminsel_dm                                   NUMBER
 dt38                                               FLOAT(126)
 dt38_r                                             FLOAT(126)
 dt38_c                                             NVARCHAR2(3)
 dt0v_alphanum_ms_1                                 NVARCHAR2(254)
 dt0v_alphanum_ms_2                                 NVARCHAR2(254)

Anyone knows why this error occurs? The comapred text is 1123 chars long and the database charset is ALUTF32. Are there any options to tweak in oracle to allow longer text compares?
0
Comment
Question by:hernst42
  • 4
  • 3
  • 2
9 Comments
 
LVL 27

Expert Comment

by:sujith80
ID: 22966378
You are inserting into which table?

Possibly the column where b0v.value is inserted has a smaller size than the actual data.
0
 
LVL 48

Author Comment

by:hernst42
ID: 22966381
No it's just a select statement, no insert or update.
0
 
LVL 26

Expert Comment

by:tigin44
ID: 22966548
there was a paranthesis mismatch... try this

select distinct v0."LK" as "Lkey", TO_NUMBER(v2."Value") AS "Value"
from b0 v0
inner join b0v v1 on (v1."Field"=100535 and v1."FK_LK"=v0."PK")
inner join ACLEntry acl5376 on (acl5376."FK_ACL"=v0."FK_ACL")
left outer join b0v v2 on (v2."Field"=100464 and v2."FK_LK"=v0."PK")
WHERE
(
      (v1."Value"<>'notis manu torulos Caesar illustri donet vati veterum cudimus pueros Chonrade torulos pignus tacitis Chonrade viros Haec valeat pignus tessera Artificum pueros vati nomismata veterum notis cudimus scribere nos quisque Artificum dabo pignus donet valeat horis valeat manu iuglans Ipse ut pignus nos facta Et chartula scribere eximias Et valeat dabo iuglans scribere nomismata Et cudimus cudimus Dum chartacea Et quisque picta signaque tacitis mei vates vati figere Emblemata vates cudimus nomismata chartacea valeat iuvenes facta Caesar tibi fallit ut chartula mei petasis veterum tibi segnes pueros Quae segnes munera torulos eximias iuvenes manus horis Dum Caesar segnes figere pignus iuglans habere supremus vates horis Et Emblemata Dum illustri manu ut parmas illustri chartacea Haec pignus pueros festivis munera picta Detinet Artificum Chonrade chartula Detinet nos chartula Ipse manu supremus habere torulos torulos torulos Artificum veterum et notis eximias ut amoris chartula amoris horis pueros viros Emblemata iuvenes petasis segnes nos scribere figere chartula veterum notis Vestibus Quae ut manus scribere picta Haec habe At tacitis veterum'
                  or v1."Value" is null
      )
      and
      (acl5376."FK_Benutzer"=1 or acl5376."FK_Gruppe" IN (9 , 6 , 4 , 1 , 2 , 3 , 13 , 14)
      )
      and acl5376."Type"='r'
)
      and v0."histtop"='Y'  
ORDER BY TO_NUMBER(v2."Value"), v0."LK" desc
0
Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

 
LVL 48

Author Comment

by:hernst42
ID: 22966683
as this is autogenerated code, where sould be the paranthesis mismatch? Also corrected SQL gives the same error:


inner join b0v v1 on (v1."Field"=100535 and v1."FK_LK"=v0."PK")
           *
ERROR at line 3:
ORA-01401: inserted value too large for column

Open in new window

0
 
LVL 26

Expert Comment

by:tigin44
ID: 22966710
so then check this portion of the query...

v1."Value"<>'notis manu torulos Caesar illustri donet vati veterum cudimus pueros Chonrade torulos pignus tacitis Chonrade viros Haec valeat pignus tessera Artificum pueros vati nomismata veterum notis cudimus scribere nos quisque Artificum dabo pignus donet valeat horis valeat manu iuglans Ipse ut pignus nos facta Et chartula scribere eximias Et valeat dabo iuglans scribere nomismata Et cudimus cudimus Dum chartacea Et quisque picta signaque tacitis mei vates vati figere Emblemata vates cudimus nomismata chartacea valeat iuvenes facta Caesar tibi fallit ut chartula mei petasis veterum tibi segnes pueros Quae segnes munera torulos eximias iuvenes manus horis Dum Caesar segnes figere pignus iuglans habere supremus vates horis Et Emblemata Dum illustri manu ut parmas illustri chartacea Haec pignus pueros festivis munera picta Detinet Artificum Chonrade chartula Detinet nos chartula Ipse manu supremus habere torulos torulos torulos Artificum veterum et notis eximias ut amoris chartula amoris horis pueros viros Emblemata iuvenes petasis segnes nos scribere figere chartula veterum notis Vestibus Quae ut manus scribere picta Haec habe At tacitis veterum'

try shortening the compared value such as

v1."Value"<>'notis manu torulos Caesar illustri donet vati veterum cudimus pueros Chonrade torulos pignus tacitis Chonrade viros Haec%'


and rerun the query
0
 
LVL 27

Expert Comment

by:sujith80
ID: 22967180
Can you run your query in sqlplus, and post the complete statement and error.( copy and paste everything from sqlplus, no editing)
0
 
LVL 48

Author Comment

by:hernst42
ID: 22967596
run via sqlplus the long statement and the shortend one. Is'nt oracle able to compare strings longer than 1024 chars? Is there an option to tweak that in oracle. With oracle 10 that was possible:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
 
SQL> select distinct v0."LK" as "Lkey", TO_NUMBER(v2."Value") AS "Value" from b0 v0 inner join b0v v1 on (v1."Field"=100535 and v1."FK_LK"=v0."PK") left outer join b0v v2 on (v2."Field"=100464 and v2."FK_LK"=v0."PK") inner join ACLEntry acl5376 on (acl5376."FK_ACL"=v0."FK_ACL") WHERE ((((v1."Value"<>'notis manu torulos Caesar illustri donet vati veterum cudimus pueros Chonrade torulos pignus tacitis Chonrade viros Haec valeat pignus tessera Artificum pueros vati nomismata veterum notis cudimus scribere nos quisque Artificum dabo pignus donet valeat horis valeat manu iuglans Ipse ut pignus nos facta Et chartula scribere eximias Et valeat dabo iuglans scribere nomismata Et cudimus cudimus Dum chartacea Et quisque picta signaque tacitis mei vates vati figere Emblemata vates cudimus nomismata chartacea valeat iuvenes facta Caesar tibi fallit ut chartula mei petasis veterum tibi segnes pueros Quae segnes munera torulos eximias iuvenes manus horis Dum Caesar segnes figere pignus iuglans habere supremus vates horis Et Emblemata Dum illustri manu ut parmas illustri chartacea Haec pignus pueros festivis munera picta Detinet Artificum Chonrade chartula Detinet nos chartula Ipse manu supremus habere torulos torulos torulos Artificum veterum et notis eximias ut amoris chartula amoris horis pueros viros Emblemata iuvenes petasis segnes nos scribere figere chartula veterum notis Vestibus Quae ut manus scribere picta Haec habe At tacitis veterum' or v1."Value" is null)))) and ((acl5376."FK_Benutzer"=1 or acl5376."FK_Gruppe" IN (9 , 6 , 4 , 1 , 2 , 3 , 13 , 14)) and acl5376."Type"='r') and v0."histtop"='Y'  ORDER BY TO_NUMBER(v2."Value"), v0."LK" desc;
select distinct v0."LK" as "Lkey", TO_NUMBER(v2."Value") AS "Value" from b0 v0 inner join b0v v1 on (v1."Field"=100535 and v1."FK_LK"=v0."PK") left outer join b0v v2 on (v2."Field"=100464 and v2."FK_LK"=v0."PK") inner join ACLEntry acl5376 on (acl5376."FK_ACL"=v0."FK_ACL") WHERE ((((v1."Value"<>'notis manu torulos Caesar illustri donet vati veterum cudimus pueros Chonrade torulos pignus tacitis Chonrade viros Haec valeat pignus tessera Artificum pueros vati nomismata veterum notis cudimus scribere nos quisque Artificum dabo pignus donet valeat horis valeat manu iuglans Ipse ut pignus nos facta Et chartula scribere eximias Et valeat dabo iuglans scribere nomismata Et cudimus cudimus Dum chartacea Et quisque picta signaque tacitis mei vates vati figere Emblemata vates cudimus nomismata chartacea valeat iuvenes facta Caesar tibi fallit ut chartula mei petasis veterum tibi segnes pueros Quae segnes munera torulos eximias iuvenes manus horis Dum Caesar segnes figere pignus iuglans habere supremus vates horis Et Emblemata Dum illustri manu ut parmas illustri chartacea Haec pignus pueros festivis munera picta Detinet Artificum Chonrade chartula Detinet nos chartula Ipse manu supremus habere torulos torulos torulos Artificum veterum et notis eximias ut amoris chartula amoris horis pueros viros Emblemata iuvenes petasis segnes nos scribere figere chartula veterum notis Vestibus Quae ut manus scribere picta Haec habe At tacitis veterum' or v1."Value" is null)))) and ((acl5376."FK_Benutzer"=1 or acl5376."FK_Gruppe" IN (9 , 6 , 4 , 1 , 2 , 3 , 13 , 14)) and acl5376."Type"='r') and v0."histtop"='Y'  ORDER BY TO_NUMBER(v2."Value"), v0."LK" desc
                                                                                                                                                                                                                               *
ERROR at line 1:
ORA-01401: inserted value too large for column
 
 
 
 
SQL> select distinct v0."LK" as "Lkey", TO_NUMBER(v2."Value") AS "Value" from b0 v0 inner join b0v v1 on (v1."Field"=100535 and v1."FK_LK"=v0."PK") left outer join b0v v2 on (v2."Field"=100464 and v2."FK_LK"=v0."PK") inner join ACLEntry acl5376 on (acl5376."FK_ACL"=v0."FK_ACL") WHERE ((((v1."Value"<>'veterum' or v1."Value" is null)))) and ((acl5376."FK_Benutzer"=1 or acl5376."FK_Gruppe" IN (9 , 6 , 4 , 1 , 2 , 3 , 13 , 14)) and acl5376."Type"='r') and v0."histtop"='Y'  ORDER BY TO_NUMBER(v2."Value"), v0."LK" desc;
 
      Lkey      Value
---------- ----------
       334
       333
       332
       331
       330
       329
       328
       327
       326
       325
       306
 
      Lkey      Value
---------- ----------
       247
       246
       245
       179
       168
        80
         4
         3
         2
         1
 
21 rows selected.
 
 
 
Connected to:
Oracle Database 10g Release 10.2.0.1.0 - 64bit Production
 
SQL> select distinct v0."LK" as "Lkey", TO_NUMBER(v2."Value") AS "Value" from b0 v0 inner join b0v v1 on (v1."Field"=100535 and v1."FK_LK"=v0."PK") left outer join b0v v2 on (v2."Field"=100464 and v2."FK_LK"=v0."PK") inner join ACLEntry acl5376 on (acl5376."FK_ACL"=v0."FK_ACL") WHERE ((((v1."Value"<>'notis manu torulos Caesar illustri donet vati veterum cudimus pueros Chonrade torulos pignus tacitis Chonrade viros Haec valeat pignus tessera Artificum pueros vati nomismata veterum notis cudimus scribere nos quisque Artificum dabo pignus donet valeat horis valeat manu iuglans Ipse ut pignus nos facta Et chartula scribere eximias Et valeat dabo iuglans scribere nomismata Et cudimus cudimus Dum chartacea Et quisque picta signaque tacitis mei vates vati figere Emblemata vates cudimus nomismata chartacea valeat iuvenes facta Caesar tibi fallit ut chartula mei petasis veterum tibi segnes pueros Quae segnes munera torulos eximias iuvenes manus horis Dum Caesar segnes figere pignus iuglans habere supremus vates horis Et Emblemata Dum illustri manu ut parmas illustri chartacea Haec pignus pueros festivis munera picta Detinet Artificum Chonrade chartula Detinet nos chartula Ipse manu supremus habere torulos torulos torulos Artificum veterum et notis eximias ut amoris chartula amoris horis pueros viros Emblemata iuvenes petasis segnes nos scribere figere chartula veterum notis Vestibus Quae ut manus scribere picta Haec habe At tacitis veterum' or v1."Value" is null)))) and ((acl5376."FK_Benutzer"=1 or acl5376."FK_Gruppe" IN (9 , 6 , 4 , 1 , 2 , 3 , 13 , 14)) and acl5376."Type"='r') and v0."histtop"='Y'  ORDER BY TO_NUMBER(v2."Value"), v0."LK" desc;
 
no rows selected

Open in new window

0
 
LVL 27

Accepted Solution

by:
sujith80 earned 1500 total points
ID: 23020216
try this.

it should work. Test for other cases where the column matches with the string as well.
select distinct v0."LK" as "Lkey", TO_NUMBER(v2."Value") AS "Value" from b0 v0 inner join b0v v1 on (v1."Field"=100535 and v1."FK_LK"=v0."PK") left outer join b0v v2 on (v2."Field"=100464 and v2."FK_LK"=v0."PK") inner join ACLEntry acl5376 on (acl5376."FK_ACL"=v0."FK_ACL") WHERE ((((v1."Value"<>cast( 'notis manu torulos Caesar illustri donet vati veterum cudimus pueros Chonrade torulos pignus tacitis Chonrade viros Haec valeat pignus tessera Artificum pueros vati nomismata veterum notis cudimus scribere nos quisque Artificum dabo pignus donet valeat horis valeat manu iuglans Ipse ut pignus nos facta Et chartula scribere eximias Et valeat dabo iuglans scribere nomismata Et cudimus cudimus Dum chartacea Et quisque picta signaque tacitis mei vates vati figere Emblemata vates cudimus nomismata chartacea valeat iuvenes facta Caesar tibi fallit ut chartula mei petasis veterum tibi segnes pueros Quae segnes munera torulos eximias iuvenes manus horis Dum Caesar segnes figere pignus iuglans habere supremus vates horis Et Emblemata Dum illustri manu ut parmas illustri chartacea Haec pignus pueros festivis munera picta Detinet Artificum Chonrade chartula Detinet nos chartula Ipse manu supremus habere torulos torulos torulos Artificum veterum et notis eximias ut amoris chartula amoris horis pueros viros Emblemata iuvenes petasis segnes nos scribere figere chartula veterum notis Vestibus Quae ut manus scribere picta Haec habe At tacitis veterum' as nvarchar2(2000)) or v1."Value" is null)))) and ((acl5376."FK_Benutzer"=1 or acl5376."FK_Gruppe" IN (9 , 6 , 4 , 1 , 2 , 3 , 13 , 14)) and acl5376."Type"='r') and v0."histtop"='Y'  ORDER BY TO_NUMBER(v2."Value"), v0."LK" desc;

Open in new window

0
 
LVL 48

Author Comment

by:hernst42
ID: 23137985
ok that works with the expliciet cast, do you also know why?
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Suggested Courses
Course of the Month13 days, 13 hours left to enroll

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question