Viewing 15 posts - 46 through 60 (of 63 total)
based on the sample code you gave, for the shipment on 2011-01-04 of qty 100 of product 123.....how do we know which receipt this was taken from?
The product is liquid...
September 1, 2011 at 7:48 am
The tables in this database have had the pagelock disabled with code like this:
EXEC sp_indexoption N'InventoryTran', N'disallowpagelocks', TRUE;
because users were blocking each other when they were updating different rows that...
August 3, 2011 at 10:41 am
I find no READ hints in the stored procedure, though it does INSERT and/or DELETE rows in InventoryTran just prior to the offending code I posted earlier. The error...
August 1, 2011 at 3:31 pm
Sorry, I am not able to post the deadlock graph. I was not running the profiler when the deadlock occurred and I am not able to re-create it on...
August 1, 2011 at 3:05 pm
Here are the 2 plan files attached
June 17, 2011 at 12:13 pm
Ok. Well, I can't get an Actual exection plan on the If Exists or If Count > 0 because the code never completes, so here is the Estimated plan...
June 17, 2011 at 11:09 am
When I save the graphical plans as .sqlplan files, they still look like the text plans. Without doing a screen print, I'm not sure how to capture the graphical...
June 17, 2011 at 10:45 am
if (select count(LotIngrLotKey) from va_negingrs) > 0
print 'exists'
Returns this plan:
StmtText
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|--Compute Scalar(DEFINE:([Expr1032]=CASE WHEN [Expr1033] THEN (1) ELSE (0) END))
|--Nested Loops(Left Semi Join,...
June 17, 2011 at 10:25 am
I would agree with you, except that I ran this:
IF (SELECT COUNT(myColumn) FROM myView) > 0
PRINT 'EXISTS'
and I waited several minutes before I gave up. I can't explain it.
June 13, 2011 at 12:46 pm
Thanks for the suggestion. I tried checking the count but still got no results. The code that I'm now using:
IF 0 NOT IN (SELECT ISNULL(LotIngrLotKey,0) FROM va_negingrs) ...
June 13, 2011 at 12:22 pm
I was able to resolve my problem by replacing the IF EXISTS with an IN statement. Apparently the exection plan is generally more efficient for IN than IF EXISTS,...
June 13, 2011 at 12:05 pm
Thanks. I guess I was making it more complicated that it needed to be.
March 8, 2011 at 9:29 am
I added this code to determine if I'm already inside a transaction so I don't try to begin another:
/*******************************************************************************************
*MANAGE NESTED TRANSACTIONS - DETERMINE WHERE TRANSACTION WAS STARTED
*******************************************************************************************
IF @@TRANCOUNT =...
May 24, 2010 at 11:04 am
UPDATE:
I was able to correct the condition that caused the error by using the method described in this discussion: http://www.developer.com/db/article.php/10920_3768671_1/TIP-Nested-Stored-Procedure-Calls-with-SQL-Server-Transactions.htm
As I suspected, the error had to do...
April 6, 2010 at 6:15 pm
Viewing 15 posts - 46 through 60 (of 63 total)