February 11, 2011 at 6:19 am
My Stock register table is given below
ID Date SysItem In OUt Balance
1 01/02/2011 10:00AM 100 150 150
2 01/02/2011 11:00AM 100 50 100
Now i am receiving 200 Nos of SysItem "100" at 01/02/2011 11:30 AM and transaction is not committed
I have to take current balance is 100 only at 01/02/2011 11:30 AM.
how to proceed.......
Advance thanks.
February 11, 2011 at 8:56 am
I'm not entirely sure I understand your question.
It sounds like you're saying that during inserts the area that you want to query is locked while the inserts are occurring and you want to know what options you have for reading the data? If that's wrong, let me know.
You should look at using Read Committed Snapshot as the isolation level for your database. That will allow you to still query the data while the inserts or updates are occurring. It does add to the tempdb, so be sure you've taken that into account.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply