Create proc [dbo].[spUpdateEstmateDetail] ( @FileCode varchar(50) ,@WorkBriefName varchar(50) ,@WorkDetailedName varchar(200) ,@EstimationDate datetime ,@WID INT ,@MID INT ,@EstimatedQuantity float ,@Unit varchar(50) ,@EstimatedAmount float ,@EstimateID INT ,@IsUpdated INT OUTPUT ) AS IF NOT EXISTS(SELECT EstimateID FROM Estimate WHERE FileCode=@FileCode) BEGIN print @EstimateID UPDATE Estimate SET FileCode=@FileCode, WorkBriefName=@WorkBriefName, WorkDetailedName=@WorkDetailedName, EstimationDate=@EstimationDate, WID=@WID, MID=@MID, EstimatedQuantity=@EstimatedQuantity, Unit=Unit, EstimatedAmount=@EstimatedAmount WHERE EstimateID=@EstimateID print @EstimateID SET @IsUpdated=1 END ELSE BEGIN SET @IsUpdated=2 ------------------------ and my table where the data .....and want to update records related to table data coulumn My table ... Estimate EstimateID FileCode WorkBriefName WorkDetailedName EstimationDate EstimatedQuantity Unit EstimatedAmount WID MID 43 f120 tryr rtee 2013-11-11 00:00:00.000 12 1 215 1 1 45 f122 gt ytr 2013-01-02 00:00:00.000 15 150 1500 31 2 44 f123 gtr ytr 2013-11-01 00:00:00.000 121 13 1500 31 2 --------------- how can i debugged in the Store procedure that where is errors So here query of Store procedure execute successfully ...but not update the records so how can alter in SP which find the error where i am wronged
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)