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

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?
LVL 48
hernst42Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SujithData ArchitectCommented:
You are inserting into which table?

Possibly the column where b0v.value is inserted has a smaller size than the actual data.
0
hernst42Author Commented:
No it's just a select statement, no insert or update.
0
tigin44Commented:
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
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

hernst42Author Commented:
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
tigin44Commented:
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
SujithData ArchitectCommented:
Can you run your query in sqlplus, and post the complete statement and error.( copy and paste everything from sqlplus, no editing)
0
hernst42Author Commented:
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
SujithData ArchitectCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
hernst42Author Commented:
ok that works with the expliciet cast, do you also know why?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.