Tag Info

New answers tagged

0

Well, as it turns out I needed to use a synchronous process to assign an id to each record after the initial insert was complete. As was pointed out to me, what I was really looking for was a commit sequence. Unfortunately even timestamp would not provide that because it is generated at insert time, not at commit time. So there could be situations where ...


4

I recommend ordering by timestamp. As long as the only records with identical timestamps are inserted in the same transaction, you can use the sequence-based ID as a secondary ordering.


2

Why not just have a transactions table: CREATE TABLE dbo.Transactions(TransactionID INT IDENTITY(1,1)); When you're about to start a new transaction (a set of imports and exports), do this: DECLARE @tID INT; INSERT dbo.Transactions DEFAULT VALUES; SELECT @tID = SCOPE_IDENTITY(); Now in your import and export tables, add a column that holds the ...



Top 50 recent answers are included