TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Rakesh Singh
NA
57
7.6k
Concurrency Issue
Feb 5 2018 2:45 AM
Issue:
When Two user tring to insert at same time at same place, then two row are generating for the same row as given below :
What happening is here, both records came at same time, when first record finish the execute INSERT query and came out then second also come inside the INSERT because when its in there till then first one was not in database so, it understand that its a new record and new row generated.
INSERT
INTO
MME.ForecastAdjustmentLineItem
(ForecastVersionId
,[CostCollectorId]
,AdjustmentDesc
,AdjustmentTypeCd
,ElementCategoryId
,CurrencyCd
,AdjustmentAmt
,SpeculativeInd
,CreateUserId
,CreateDttm
,UpdateUserId
,UpdateDttm
,LastUpdateDttm)
VALUES
(@ForecastVersionId
,@CostCollectorId
,@AdjustmentDesc
,@AdjustmentTypeCd
,@ElementCategoryId
,@CurrencyCd
,@AdjustmentAmt
,0
,@CreateUserId
,@CreateDttm
,@UpdateUserId
,@UpdateDttm
,@LastUpdateDttm )
SET
@ForecastAdjustmentLineItemId = SCOPE_IDENTITY()
Reply
Answers (
2
)
need a sql script to produce a result from 2 tables
performance counter registry hive consistency failed