It's Friday afternoon, and the sun is shining in Seattle, which is a rare occurrence. I'm staring at this code and the synapses just aren't firing like they used to, so I'll put it up for a quick answer by the masters...Here's the code: INSERT INTO Table1 (EventID, Title, Description) SELECT EventID, Title, Description FROM Table2 WHERE MoveFlag = 1UPDATE Table2 SET MoveFlag = 0 WHERE MoveFlag = 1
What happens when a new record is inserted/updated into Table2 setting MoveFlag = 1 by another user between the execution of the two statements above? Will putting this in a TRANS (of course it will be in a sproc) prevent the new record from being changed back to MoveFlag=0 without getting inserted into Table1?------------------------------------------------------------------Contractor$ never die, they just leave for higher-paying project$.