Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Triggers when inserting multiple records

Status
Not open for further replies.

DeveloperJr

Programmer
Mar 10, 2007
25
US

I need to write a trigger to compare some fields when I insert a record in table to all the other records and see if we have this record before or not.

The problem is, more than one record can be inserted at a time. One of my friends told me that the trigger need to be written in such a way to expect more than one record in the inserted virtual table, he stopped at this point and didn’t give me any ideas or guide lines.

Would some one, please, elaborate a little more on this with some examples of badly written triggers that don’t take multiple records into consideration. I am totally blank on this one.

Thanks in advance

 
Take a look here: thread183-1395965

SQLSister explains it pretty well.

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top