DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Issue with BEFORE INSERT trigger

  1. #1
    Join Date
    Oct 2006
    Posts
    175

    Issue with BEFORE INSERT trigger

    Hi all
    I've caught into strange situation here. Attached query works just fine in our Dev RAC, but just won't in our Prod RAC. We have a BEFORE INSERT trigger that takes nextval from a sequence. I've attached the query, trigger, sequence and table DDL. When I run the query it gives me
    'ORA-01400: cannot insert NULL into ("USER_T"."USR_LLG_DETAIL"."LETTERID")'.

    Any hints, suggestions are appreciated.

    Thanks
    gtcol
    Attached Files Attached Files

  2. #2
    Join Date
    Oct 2006
    Posts
    175
    Has nobody experienced this before?

  3. #3
    Join Date
    Oct 2006
    Posts
    175
    Issue here is it works fine when I hard code the value for x.MemId in ('xx','yy','zz')(ie. the output generated by the select itself) at the end. But it just doesn't work when I remove this part.

  4. #4
    Join Date
    Feb 2009
    Location
    Azerbaijan, Baku
    Posts
    24

    Hi

    It seems from the error that

    1. LETTERID column of table USR_LLG_DETAIL, which belongs to user USER_T is primary key, and you want to insert NULL value in it
    2. Are you getting the new id value from Sequence?

    Could you please post the code (3-4 lines) of insertion?

  5. #5
    Join Date
    Oct 2006
    Posts
    175
    Quote Originally Posted by Kamran Agayev View Post
    It seems from the error that

    1. LETTERID column of table USR_LLG_DETAIL, which belongs to user USER_T is primary key, and you want to insert NULL value in it
    2. Are you getting the new id value from Sequence?

    Could you please post the code (3-4 lines) of insertion?
    1. Yes. Trigger is supposed to populate it.
    2. Yes
    3. Attached is the script.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width