Mike,I was testing to see which would have a better execution plan...select top 1 or select where in Max(dt)..I expected some dups in my sql..but not the amount I got,,granted I looped and did mass inserts...generating about 200k rows...But I got about 2k rows with the exact same timestamp..down to the microseconds...man that's fast..SO I gues the question is, that since there is a potential for dups (not on that scale grant you), but how do you get the "last" record entered. There are no gaurentees....I think his is an Oracle background questionDare I say it (Nooooooooooooooooooooo)Identity?Here's the mess I played with:USE NorthwindGOSELECT TOP 1 * INTO OrderDetails_2 FROM [Order Details]GOTRUNCATE TABLE OrderDetails_2GOALTER TABLE OrderDetails_2 ADD ADD_DT datetime NOT NULL CONSTRAINT cnstrt_OrderDetails2_1 DEFAULT getdate() WITH VALUESGOCREATE INDEX IX1 ON OrderDetails_2 (ADD_DT)GODECLARE @x intSELECT @x = 0WHILE @x < 100 BEGIN INSERT INTO OrderDetails_2(OrderID, ProductID, UnitPrice, Quantity, Discount) SELECT * FROM [Order Details] SELECT @x = @x + 1 ENDSELECT COUNT(*) FROM OrderDetails_2GOSELECT TOP 1 * FROM OrderDetails_2 ORDER BY ADD_DT DESCGOSELECT * FROM OrderDetails_2 o WHERE ADD_DT IN (SELECT MAX(ADD_DT) FROM OrderDetails_2)GODROP TABLE OrderDetails_2GO
Brett8-)SELECT @@POST=NewId()That's correct! It's an AlphaNumeric!