CREATE PROCEDURE TRN_PURBILL_INSERT @ent_code varchar(2) AS BEGIN TRY BEGIN TRANSACTION; if not exists (select ent_code from PURBILL WHERE ent_code=@ent_code) BEGIN -- call purchase bill insert store procedure EXEC SP_PURBILL_INSERT -- call invpart insert store procedure EXEC SP_INVPART_INSERT -- call bill charges insert store procedure EXEC SP_BILLCHRG_INSERT COMMIT TRANSACTION; END TRY BEGIN CATCH ROLLBACK TRANSACTION; RAISERROR('Error Occured While Entering Records!',16,1) END CATCH GO
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)