Hello Tara, I am sorry may be i am doing something wrong, i have two inserts within one sp one after other second one using first once scopeidentity Id.ALTER PROC [dbo].[Insert_Tab_DOCNETPM] @ProgID int = null, @ProjID int = null, @ContractID int = null, @LogTypeID int = null, @RMTitle nvarchar(100) = null, @ContractorRefNo nvarchar(50) = null, @DocumentDate datetime = null, @ReceivedDate datetime = null, @RMLoggedDate datetime = null, @AcknowledgedDate datetime = null, @DocumentTypeID int = null, @DocumentSourceID int = null ASDECLARE @PMID int;DECLARE @SequenceNo real;DECLARE @Identity int = null;BEGIN TRANSACTION--SELECT @PMID = ISNULL(max(PMID),0) + 1 from [TAB_docNetPM];SELECT @SequenceNo = IsNUll(max(SequenceNo),0)+1 from [TAB_docNetPM] where ProgID = @ProgID AND ProjID = @ProjID AND ContractID = @ContractID AND LogTypeID = @LogTypeIDINSERT INTO [TAB_docNetPM]( [ProgID] ,[ProjID] ,[ContractID] ,[LogTypeID] ,[PMTitle] ,[SequenceNo] ,[ContractorRefNo] ,[DocumentDate] ,[ReceivedDate] ,[RMLoggedDate] ,[AcknowledgedDate] ,[DocumentTypeID] ,[DocumentSourceID]) VALUES ( @ProgID, @ProjID, @ContractID, @LogTypeID , @PMTitle , @SequenceNo , @ContractorRefNo, @DocumentDate , @ReceivedDate , @RMLoggedDate , @AcknowledgedDate , @DocumentTypeID , @DocumentSourceID); SELECT SCOPE_IDENTITY(); SET @Identity = SCOPE_IDENTITY(); INSERT INTO TAB_docNetPM_log (PMID, ProgID, ProjID, ContractID, SequenceNO, PMTitle, LogTypeID, ContractorRefNo, DocumentDate, ReceivedDate, RMLoggedDate, AcknowledgedDate, DocumentTypeID, DocumentSourceID)Values (@Identity, @ProgID, @ProjID, @ContractID, @SequenceNO, @PMTitle, @LogTypeID, @ContractorRefNo, @DocumentDate, @ReceivedDate, @RMLoggedDate, @AcknowledgedDate, @DocumentTypeID, @DocumentSourceID)COMMIT TRANSACTION