Someone in our company used ident_current where he should have used scope_identity (and now should be using OUTPUT). It happened that the application was inserting a record at the same time as a data import of millions of records was running. The wrong ids got attached to the child records in the subsequent record import causing a data integrity problem that took a long time to figure out and fix. There is no circumstance where you should be using ident_current to grab a value you just inserted. It is a guarantee of data integrity problems.
If you are using a version of SQL server that has OUTPUT available, this is the technique that is preferred. Not only will OUTPUT give you the id just inserted but it can also give you other values inserted, so that you can get values for multiple record inserts more easily as a well as single ones You can also use it to find out what was deleted or updated. So it is an extremely valueable tool. Basically, you set up a table variable with the columns you want, then you use the OUTPUT clause in the INSERT, UPDATE or DELETE, then you can use the table variable afterwards to get the information you need for other processing steps. Some examples to see what you can do with output in an insert statement:
DECLARE @MyTableVar table( MyID int,
MyName varchar(50));
INSERT MyTable1 (MYName)
OUTPUT INSERTED.MyID, INSERTED.MyName
INTO @MyTableVar
VALUES ('test');
--Display the result set of the table variable.
SELECT MyID, MyName FROM @MyTableVar;
--Display the result set of the table.
Insert into table2 (MyID,test2, test2)
SELECT MyID, 'mttest1', 'mytest2' FROM @MyTableVar;
Insert into table2 (MyID,field1, InsertedDate)
SELECT MyID, s.Field1, getdate() FROM @MyTableVar t
join stagingtable s on t.MyName = s.MyName