Dear All,

Hope my this post will find you all in good health.

I'm facing the title problem since i removed my trigger and shift these comands in Insert SP. Here is the SP

INSERT INTO dbo.PRP_tbBillofQuantityCostCenter WITH (ROWLOCK) (BillofQuantityCostCenterDataID, ProposalID, BillofQuantityID, CostCenterID, RowLegend, ConversionFactor, ConvertedQuantity, StandardManHours, DifficultyFactor, FactorizedManHours, CrewPackage, ConsumablePackage, MaterialPackage, ConstructionEquipmentPackage, SpecializedJobPackage, SubLet, SubLetFactorizedManHours, MaterialonBillofQuantity, ConversionFactorManuallyChanged, CreatedBy, CreatedOn, LastUpdatedBy, LastUpdatedOn)
VALUES (@BillofQuantityCostCenterDataID, @ProposalID, @BillofQuantityID, @CostCenterID, @RowLegend, @ConversionFactor, @ConvertedQuantity, @StandardManHours, @DifficultyFactor, @FactorizedManHours, @CrewPackage, @ConsumablePackage, @MaterialPackage, @ConstructionEquipmentPackage, @SpecializedJobPackage, @SubLet, @SubLetFactorizedManHours, @MaterialonBillofQuantity, @ConversionFactorManuallyChanged, @SysUserID, @SysTimeStamp, @SysUserID, @SysTimeStamp)

SET @BillofQuantityCostCenterID = SCOPE_IDENTITY()

/* Following Code Use in Insert Trigger of this table */

DECLARE @BillofQuantityScheduleDataID int

SELECT @BillofQuantityScheduleDataID = BillofQuantityScheduleDataID
FROM dbo.PRP_tbBillofQuantityScheduleData WITH (NOLOCK)
WHERE RTRIM(LTRIM(UPPER(ISNULL(Notes, '')))) = ''

IF NOT EXISTS (SELECT BillofQuantityCostCenterID FROM dbo.PRP_tbBillofQuantitySchedule WHERE BillofQuantityCostCenterID = @BillofQuantityCostCenterID)
INSERT INTO PRP_tbBillofQuantitySchedule WITH (ROWLOCK) (BillofQuantityScheduleDataID, BillofQuantityCostCenterID, ProposalID, CalendarID, ResourceDistributionCurveID, StartDate, FinishDate, PrimaveraActivityID, CreatedBy, CreatedOn, LastUpdatedBy, LastUpdatedOn)
SELECT @BillofQuantityScheduleDataID, @BillofQuantityCostCenterID, @ProposalID, CalendarID, ResourceDistributionCurveID, StartDate, FinishDate, '', @SysUserID, @SysTimeStamp, @SysUserID, @SysTimeStamp
FROM SET_tbProposalSetting WITH (NOLOCK)
INNER JOIN PRP_tbBillofQuantity WITH (NOLOCK) ON PRP_tbBillofQuantity.BillofQuantityID = @BillofQuantityID
INNER JOIN PRP_tbProposalSchedule WITH (NOLOCK) ON PRP_tbProposalSchedule.CostCenterID = PRP_tbBillofQuantity.CostCenterID
WHERE SET_tbProposalSetting.ProposalID = @ProposalID


IF NOT EXISTS (SELECT ProposalID FROM dbo.PRP_tbBillofQuantityCostCenterCost WITH (NOLOCK) WHERE BillofQuantityCostCenterID = @BillofQuantityCostCenterID AND ProposalID = @ProposalID)
INSERT INTO dbo.PRP_tbBillofQuantityCostCenterCost WITH (ROWLOCK) (BillofQuantityCostCenterID, ProposalID)
VALUES (@BillofQuantityCostCenterID, @ProposalID)

please help we are facing this sometimes.
Mohid