User871725404 posted
I have this SP and I'm using transaction in it. The problem is that it will be inserted in the first table but not in the second. When I insert in the second tabel there is an error, shouldn't the transaction rollback?
BEGIN TRAN T1
INSERT INTO Property(MemberId, PropertyNumber, OldPropertyNumber)
SELECT ID, Fastnr, Fastnrgl
FROM DemoMedlem ud
INSERT INTO MemberProperty(PropertyId, MemberId)
SELECT PropertyId, MemberId
FROM Property
COMMIT TRAN T1