• Toreador (5/13/2010)


    Interesting - it never occurred to me that the identity values wouldn't be available in the inserted table!

    So how would you get the identity values of the rows you'd just inserted?

    By not using an "INSTEAD OF" trigger. But I agree with you... you normally don't go investigating the types of triggers on tables when writing code to insert into them.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2