Viewing 15 posts - 58,291 through 58,305 (of 59,048 total)
In that case... this works... there may be a correlated sub-query solution but I didn't use one... obviously, you would replace #yourtable with your real table name after you're done...
April 11, 2006 at 9:43 pm
Shane,
Do you want only the downtime between 10:00 and 11:00 or do you want the downtime for every hour of a given day? Also, is there a date associated with...
April 11, 2006 at 7:01 am
What day of the week do you consider the first day of the week to be?
April 11, 2006 at 6:48 am
What is it that distiguishes CaseID 2 from 1 and 3? As in your first example of data, what connects ANY 2 calls (CaseID's) if multiple calls meet the same conditions?
April 11, 2006 at 6:39 am
Guess I read it differently, Marshall... I didn't read the original request as a full transposition based on what some folks have asked for in the past... Not enough coffee
April 10, 2006 at 5:28 pm
Just a follow up... I did some million row testing on the simple functions we created here...
On a quiet multiprocessor box, the functions returned about 12% faster than the inline...
April 8, 2006 at 6:53 pm
Untested but should work...
SELECT d.Value AS [IN Statement], CASE WHEN ta.Col_1 IS NULL THEN 'No Match' ELSE ta.Col_1 END AS [Values Col_A Matches] FROM TabA ta RIGHT OUTER JOIN (--Derived...
April 8, 2006 at 1:29 pm
Unless your data actually looks more like the following, the code is going to be a wee bit more complicated than what I have below...
TxnNo Amount Type
100 1500 R
100 ...
April 8, 2006 at 11:29 am
You shouldn't necessarily need a function to convert a VARCHAR date to a datetime to save in a table... it's one of those "instrinsic conversions" that happen auto-magically if the...
April 8, 2006 at 11:17 am
KH did it right... if you expand upon the example KH provided, it works great, is nasty fast, and does not require a trip to the app.
April 8, 2006 at 9:50 am
Zia,
Instead of using COMPUTE, consider using WITH ROLLUP or WITH CUBE. There's some great documentation on how to exploit the related GROUPING sub-totals for ROLLUP and CUBE in Books OnLine under...
April 8, 2006 at 9:45 am
Dave,
Very volitile subject... I got involved with a pretty big discussion on this subject before and I'll just say that, in all the "million-row" testing I did, I satisfied myself that properly...
April 8, 2006 at 9:31 am
They say that one test is worth a thousand calculations and a million guesses... Noeld is correct. But don't take my word for it... I expanded my normally well behaved...
April 7, 2006 at 11:03 pm
Very nice... very nice indeed...
These might execute a bit quicker... in fact, considering that they're single line formulas, you may not want to use them as functions, at all.. just...
April 7, 2006 at 8:38 pm
For the data presented, this'll do it... and it doesn't assume that there will only be different 3 rows in the return...
SELECT Col1,Col2,Col3,MAX(Col4) AS Col4 FROM yourtable GROUP BY Col1, Col2, Col3 ORDER...
April 7, 2006 at 6:27 am
Viewing 15 posts - 58,291 through 58,305 (of 59,048 total)