Viewing 15 posts - 30,226 through 30,240 (of 59,101 total)
A lot better. Well done! There's just one problem. In order to make my code fit your unit based Tally Table, you changed my code and it...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 1, 2012 at 5:25 am
For the same reason you'd distinct a column with dupes. To find out if there are dupes.
--Jeff Moden
Change is inevitable... Change for the better is not.
May 1, 2012 at 5:06 am
Heh... XXX... did you really mean "Part 30"?
Random gaps and islands are easy although known gaps and islands make life a whole lot easier test wise. Just build a...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 1, 2012 at 5:04 am
dwain.c (4/30/2012)
Jeff Moden (4/30/2012)
dwain.c (4/30/2012)
Now this one ties with yours but my second solution comes up lowest.How did you measure?
Actual execution plan costs.
Before you say again that the actual execution...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 30, 2012 at 9:57 pm
dwain.c (4/30/2012)
Now this one ties with yours but my second solution comes up lowest.
How did you measure?
--Jeff Moden
Change is inevitable... Change for the better is not.
April 30, 2012 at 8:48 pm
p.s. Beware of using execution plan cost comparisons. Even the actual execution plans are far from perfect.
--Jeff Moden
Change is inevitable... Change for the better is not.
April 30, 2012 at 8:31 pm
dwain.c (4/30/2012)
Jeff Moden (4/30/2012)
dwain.c (4/30/2012)
Thought I could slip one past old Eagle Eye! Guess I was wrong.
Perhaps a more direct approach... pick your favorite zero-based "Tally Table" method.
WITH
cteCount AS
(
...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 30, 2012 at 8:26 pm
dwain.c (4/30/2012)
Thought I could slip one past old Eagle Eye! Guess I was wrong.
Perhaps a more direct approach... pick your favorite zero-based "Tally Table" method.
WITH
cteCount AS
(
SELECT t1.Date,
...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 30, 2012 at 8:06 pm
ChrisM@Work (4/30/2012)
dwain.c (4/30/2012)
ChrisM@Work (4/30/2012)
dwain.c (4/29/2012)
--Jeff Moden
Change is inevitable... Change for the better is not.
April 30, 2012 at 11:26 am
markpc2009 (4/30/2012)
CROSS JOIN (SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4) as T (N)
and i...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 30, 2012 at 11:11 am
dwain.c (4/25/2012)
DECLARE @abc TABLE (Date DATETIME, Amount INT, Category VARCHAR(10))
INSERT INTO @abc SELECT '2012-04-13',1000,'a'
UNION ALL SELECT '2012-04-12',500,'b' UNION ALL SELECT '2012-04-11',7000,'c'
UNION ALL SELECT '2012-04-10',650,'c'...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 30, 2012 at 6:49 am
tysonlibelula (4/30/2012)
---------U need to use a fetch row sintax
Actually, you don't. A Cursor or While Loop is hardly ever necessary and will almost always be much slower than its...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 30, 2012 at 6:33 am
There's a good chance that when a "rollback" hangs up like this, that it's waiting on something in another spid to complete. It's sometimes difficult to find but you...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 30, 2012 at 6:23 am
Maybe but I do know that when I come to a fork in the road, I take it. 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
April 30, 2012 at 6:10 am
Samrat Bhatnagar (4/28/2012)
Any suggestions on how to generate test data for following scenarios:
1. Two tables linked using PK-FK relationship e.g. Product Category and...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 30, 2012 at 6:07 am
Viewing 15 posts - 30,226 through 30,240 (of 59,101 total)