Viewing 15 posts - 58,336 through 58,350 (of 59,099 total)
I just can't bring myself to trust anything in an article where the author makes mistakes like the following...
"Remember that the BETWEEN clause retrieves values that are equal...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 15, 2006 at 10:22 pm
David wrote... "If I was to use the static table approach I would probably stick it in its own database so that it wouldn't artificially inflate the backups."
Yep, I know...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 14, 2006 at 6:19 pm
Thank you for the very nice compliment... I only hope it does what you need ![]()
--Jeff Moden
Change is inevitable... Change for the better is not.
April 14, 2006 at 6:12 pm
Well done, David. It's nice to see it when someone takes multiple methods and does a really good performance comparison.
It seems that generating a range of numbers in a temporary...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 13, 2006 at 10:49 pm
...and thank you for the feedback...
By the way, if you do put such an index on the table, you will never have duplicates again.
--Jeff Moden
Change is inevitable... Change for the better is not.
April 13, 2006 at 6:23 pm
I only count 2 extra rows but that may be due to a simple lack of coffee... ![]()
Anyway... I think this might be what...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 13, 2006 at 6:20 pm
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...
--Jeff Moden
Change is inevitable... Change for the better is not.
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...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 11, 2006 at 7:01 am
What day of the week do you consider the first day of the week to be?
--Jeff Moden
Change is inevitable... Change for the better is not.
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?
--Jeff Moden
Change is inevitable... Change for the better is not.
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 --Jeff Moden Change is inevitable... Change for the better is not.
RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
Helpful Links:
How to post code problems
How to Post Performance Problems
Create a Tally Function (fnTally)
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...
--Jeff Moden
Change is inevitable... Change for the better is not.
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...
--Jeff Moden
Change is inevitable... Change for the better is not.
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 ...
--Jeff Moden
Change is inevitable... Change for the better is not.
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...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 8, 2006 at 11:17 am
Viewing 15 posts - 58,336 through 58,350 (of 59,099 total)