i am writing a trigger that needs to perform the same actions on 80+ different variables, and i need someplace to put the variables so that they can be called by a looping subroutine<BR><BR>(this is different enough from my earlier post to warrant its own thread)<BR><BR>to save space, i wont expound on why i need a temporary place to store the values of the variables, but just take my word that i cant use the source table or the destination table.<BR><BR>all of the variables have unique names, and the code that i need to run on each variable might be 10 lines long. i want to avoid needing (80x10=)800 lines of code to iterate through the variables 1 by 1.<BR><BR>i thought about using an array, but then i thought that in an RDBMS like SQL Server you probably use temporary tables instead of an array. is this true? but if that is the case, then there must be locking issues that i need to understand<BR><BR>this brings me to my question....how can i create a place to store the temporary data in the procedure that can do its job even when 30 other people are firing the same trigger on different records in the same table at the same time? is there an object other than a table or an array? if i create a table at the start of the trigger and then delete it at the end of the trigger, how do i avoid locking issues when 2 concurrent users are firing the same trigger? i want to avoid a situation where user a fires the trigger a split second before user b fires the trigger, causing user b to get an error message saying the table already exists, or another error message saying that the table was deleted before the trigger could run its course.<BR><BR>surely there is some prebuilt functionality in SQl server to avoid my having to plan for all these eventualities. perhaps the TRIGGER object is an implicit transaction that takes firm locks on all the necessary resources each time it it firing? in this case, the 30 concurrent users firing the trigger would be put in a queue by SQL Server and fire one after another to avoid conflicts?<BR><BR>can someone please give me a brief explanation of this so that i can create the object that i need?