Viewing 15 posts - 56,356 through 56,370 (of 59,069 total)
Thanks for the feedback. Guess it's whatever you want. If today is a business day and the start date and end date are both today, I want it to register...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 22, 2007 at 7:17 am
Just having a bunch of idexes may not help a thing...
Try these...
CREATE INDEX IX_Sales_Composite1 ON Sales (UserID,LineNumber,Amount) CREATE INDEX IX_Punctuation_Composite1 ON Punctuation (UserID,StartLineNumber,StopLineNumber,Dated)
--Jeff Moden
Change is inevitable... Change for the better is not.
May 22, 2007 at 6:25 am
But, that's more correlated subqueries... why not use a simple join for the WHERE EXISTS?
--Jeff Moden
Change is inevitable... Change for the better is not.
May 22, 2007 at 5:49 am
Heh... yeah, I crossed out the wrong part, huh? Shouldn't post when I'm pooped. Thanks, Serqiy.
--Jeff Moden
Change is inevitable... Change for the better is not.
May 22, 2007 at 12:00 am
Heh... Thanks Jacob...
Ok... apples to apples on the last bit of code... the following takes 1:09 including the PK.
--===== Create and populate a test table.
-- Column "SomeDate"...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 21, 2007 at 11:57 pm
Nope... from BOL...
Lesser of batch size or 250 MB
--Jeff Moden
Change is inevitable... Change for the better is not.
May 21, 2007 at 11:19 pm
Yeah... but I hate Oracle ![]()
--Jeff Moden
Change is inevitable... Change for the better is not.
May 21, 2007 at 11:17 pm
Go for broke... read up on WITH CUBE in BOL... that's where they teach you about the GROUPING function that works both with ROLLUP and CUBE.
--Jeff Moden
Change is inevitable... Change for the better is not.
May 21, 2007 at 11:13 pm
The outer join certainly does the trick but the subquery wasn't the problem... the fact that you made it a correlated subquery may have been.
select * from TableA
where ID not...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 21, 2007 at 11:11 pm
Jacob,
Your idea is great but your code is too complex for what it does and it takes too long to run... for example, you say the code to produce a...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 21, 2007 at 10:42 pm
I agree with Ed on both points... The fact that you are even considering some standardized method of formatting is a huge step in the right direction. And, whatever format...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 21, 2007 at 8:15 pm
But you have the same problem commenting out the first line... Yes?
--Jeff Moden
Change is inevitable... Change for the better is not.
May 21, 2007 at 8:05 pm
How quickly CTE's have made folks forget all about Temp Tables, Table Variables, and Views ![]()
--Jeff Moden
Change is inevitable... Change for the better is not.
May 21, 2007 at 8:02 pm
If that's all you intend to use the Calendar table for, you can use the following along with a simple Holiday table for the same thing...
SELECT
(DATEDIFF(dd, @StartDate,...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 21, 2007 at 7:50 pm
>>"scoop a few, ah, droppings, then write an editorial"
BWAAAA-HAAAAA-HAAAAA!!!! Oh, I laughed out loud! Almost sounds like a prerequisite! Way too funny! Thanks for the great laugh, Steve!
--Jeff Moden
Change is inevitable... Change for the better is not.
May 21, 2007 at 7:44 pm
Viewing 15 posts - 56,356 through 56,370 (of 59,069 total)