• ALZDBA (8/28/2013)


    What will happen to your trigger if someone inserts data of multiple ProjectID / ProposalID / SolutionId / UnitID in a single batch ?

    Keep in mind exceptions do occur !

    e.g. uploading a set in bulk or during upgrades

    Prepare it to be able to handle sets !

    Thats why I put another condition in IF as @count > 1..

    In this case it will insert only a single row on basis of max(requestid) from the bulked inserted rows

    _______________________________________________________________
    To get quick answer follow this link:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/