Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
ALTER PROCEDURE [dbo].[SP_Complete_Transaction] @id int AS BEGIN BEGIN TRAN Complete_Transaction SET NOCOUNT ON; If ( (select sum(amount) as amount from subtransaction where transactionsid=@id and status=2) = (select amount from transactions where id=@id and status=2) and (select sum(payoutamount) as payoutamount from subtransaction where transactionsid=@id and status=2) = (select countervalue from transactions where id=@id and status=2) ) update transactions set status = 3 where id =@id update subtransaction set status = 3 where transactionsid =@id ELSE select id from transactions where id=@id IF @@ERROR <> 0 ROLLBACK TRAN Complete_Transaction ELSE COMMIT TRAN Complete_Transaction END
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|Inserting a column in a table that creates an ID and row number||4||76|
|display data in text field from data base for updating||6||79|
|MS SQLK Server multi-part identifier cannot be bound||5||50|
|Email Notifications for SQL 2005||9||43|
Join the community of 500,000 technology professionals and ask your questions.