how do i fix the error ORA-01401: inserted value too large for column in PL/SQL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Trisha Cardenas

    how do i fix the error ORA-01401: inserted value too large for column in PL/SQL

    INSERT INTO sm3pm
    SELECT 'MANILA',
    group_nm,
    upper(theater_d esc),
    null,
    upper(movie_tit le),
    nvl(gross_amt,0 ),
    v_mladt,
    sysdate
    from mlasm_details@h s_sm3pm_xls
    where group_nm is not null
    and movie_title is not null
    and group_nm <> 'MOVIE_TITLE';

    COMMIT;

    update sm3pm_gross x
    set theater_cd = (select max(theater_cd)
    from stg_bds_theater _mstr
    where trim(upper(thea ter_name)) = trim(upper(x.th eater)))
    where area = 'MANILA'
    and theater_cd is null;
  • rski
    Recognized Expert Contributor
    • Dec 2006
    • 700

    #2
    You need to show us table definitions. It looks like you try to put value that do not match column type.

    Comment

    • amitpatel66
      Recognized Expert Top Contributor
      • Mar 2007
      • 2358

      #3
      The problem is with your Insert statement. Just check the length of all the columns of the table sm3pm and make sure the values that you are trying to insert are within the maximum length allowed for the columns.

      I suspect columns like theater_Desc and movie_title are causing the problem.

      It would be helpful if you can post the table structure and the output of the below query:

      [code=oracle]

      SQL> SELECT group_nm,LENGTH (group_nm)
      upper(theater_d esc),LENGTH(the ater_desc),
      null,
      upper(movie_tit le),LENGTH(movi e_title),
      nvl(gross_amt,0 ),
      v_mladt,LENGTH( v_mladt),
      sysdate
      from mlasm_details@h s_sm3pm_xls
      where group_nm is not null
      and movie_title is not null
      and group_nm <> 'MOVIE_TITLE'
      /

      [/code]

      Comment

      Working...