• In your table GV_Voucher, the column TransactionID has not been defined as a UNIQUE KEY

    You will have to make TransactionID a UNIQUE KEY in GV_Voucher to create this FOREIGN KEY constraint

    But, as I mentioned in your other thread, if the column TransactionID is indeed unique, then you need not add the column in your GV_ReceivedOffice table at all.

    http://www.sqlservercentral.com/Forums/Topic1446803-391-1.aspx


    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/