Results 1 to 3 of 3
  1. #1
    Join Date
    May 2009

    Question Unanswered: Trigger while inserting a record


    I need to create a trigger for inserting in such a way that while inserting a record, if we try to insert duplicate value (exept nulls)in a particular column, that record should not be inserted. The rest of the records should get inserted.

  2. #2
    Join Date
    Mar 2009
    a trigger is not the way to go. depending on the situation I would use some kind existence check and you can do this in your insert most likely. Do you have some code to share? Have you ever used NOT EXISTS of LEFT OUTER JOINS?

  3. #3
    Join Date
    Dec 2007
    Richmond, VA
    Provided Answers: 5
    what about a unique constraint on the table??? then your insert process gets duplicate error back and you do what you want with that record prior to inserting the next.

Posting Permissions

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