• greeshma.patla (9/11/2012)


    Msg 2627, Level 14, State 1, Line 10

    Violation of PRIMARY KEY constraint 'XPKLKP_PARAM_TYPE'. Cannot insert duplicate key in object 'dbo.LKP_PARAM_TYPE'.

    The statement has been terminated.

    With this approach, I am sure you will get this error again and again

    Just imagine what would happen if somebody failed to update the PARAM_TYPE_ID column in LKP_PARAM_TYPE table with the latest value( you will get the error again )

    greeshma.patla (9/11/2012)


    I have gt this idea suggest me if i can do it in a better way .........

    Yes. As others have also said "Use IDENTITY".


    Kingston Dhasian

    How to post data/code on a forum to get the best help - Jeff Moden
    http://www.sqlservercentral.com/articles/Best+Practices/61537/