Viewing 15 posts - 5,146 through 5,160 (of 5,685 total)
Try this:
Be aware, this uses a serial updating methodology and I don't always follow every rule from Jeff's Quirky Update post here on SSC. This will work, however, as...
November 1, 2010 at 3:04 pm
Something like this, perhaps?
SELECT
Code,
MaxTime,
CASE WHEN CODE = 'XX' AND MaxTime >= '2010-10-02' THEN 'DELAY'
WHEN CODE = 'XY' AND MaxTime >= '2010-10-05' THEN 'DELAY'
ELSE 'SUCCESS' END AS SuccessDelay
FROM
(SELECT
Code,
MAX( [Time]) AS MaxTime
FROM
#Temp...
November 1, 2010 at 2:53 pm
Problem is this portion of your query, in regards to the error:
(select ("timestamp") from X where refeventid=b.refeventid
and "timestamp"< b."timestamp")
It needs to return a single entry for the function, and...
November 1, 2010 at 2:49 pm
James, thank you for the kindness. It's appreciated... especially recently.
Hahah, okay, now that the selectivity is frying the 0.3% rule (1 day in a year, as a rule of...
November 1, 2010 at 2:41 pm
An alternative is going to be a #tmp with specific indexes using the Quirky Update method, inverting the row numbering, using quirky to carry values down the nulls, then inverting...
November 1, 2010 at 2:02 pm
WayneS (11/1/2010)
Craig, I guess you whopped up on me! Only 40% of the time of mine... very good.
Well, every now and then I get lucky. :w00t: Honestly though, my...
November 1, 2010 at 1:51 pm
Were you able to try this in a copy of the proc?
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
I'm curious if we can completely absolve the system of the locking issue.
November 1, 2010 at 1:24 pm
Brian McGee-355525 (11/1/2010)
Many thanks. That's pretty much what I've always done, except using IsNull instead of Coalesce (is it really faster?)
There's been a number of timing tests out there...
November 1, 2010 at 1:18 pm
There's a third option that may may your life easier for concurrency, but will add significant complexity if you're unfamiliar with it.
Use Service Broker.
The basic layout would be this. ...
November 1, 2010 at 1:12 pm
That's kinda what we'd end up doing. Part of the reason I'm trying to get to the core of the data is because I'd actually completely rebuild from scratch...
November 1, 2010 at 12:44 pm
jamesniesewand (11/1/2010)
November 1, 2010 at 12:40 pm
Templar,
Trying to turn that into a usable test set and running into some issues. Biggest one is you trimmed (not sure how) some of the PRIMARY KEY builds.
For example:
CONSTRAINT...
November 1, 2010 at 12:35 pm
James,
First, nice work on the sampleset and work shown. Helped a lot.
I usually use a variant on your Method 2 and 3, along these lines:
select
et.ExampleTableID,
et.ExampleProduct,
et.ExampleValue as...
November 1, 2010 at 12:13 pm
I'm 98% sure it's possible to get you out of the cursor based methodology here. Can you post the DDLs for the involved tables and a bit of sample...
November 1, 2010 at 11:56 am
homebrew01 (11/1/2010)
November 1, 2010 at 11:51 am
Viewing 15 posts - 5,146 through 5,160 (of 5,685 total)