Viewing 15 posts - 31,636 through 31,650 (of 59,099 total)
SQLJocky (12/19/2011)
--Jeff Moden
Change is inevitable... Change for the better is not.
December 19, 2011 at 9:23 pm
David Moutray (12/19/2011)
bteraberry (12/19/2011)
--Jeff Moden
Change is inevitable... Change for the better is not.
December 19, 2011 at 9:12 pm
Michael Valentine Jones (12/19/2011)
SELECT TOP 1
a.f1
FROM
(
SELECT TOP 2
b.f1
FROM
tmp2nd b
ORDER BY
b.f1 ASC
) a
ORDER BY
a.f1 DESC
Heh... on of my favorites for "paging" code. 🙂 You left out @LinesPerPage = 1, @Page...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 19, 2011 at 8:56 pm
Just a couple of notes:
1. The clustered index contained columns that didn't matter.
2. You had two orphaned variables that did nothing in the code. I removed...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 19, 2011 at 7:44 pm
Stefan Krzywicki (12/19/2011)
GSquared (12/19/2011)
Stefan Krzywicki (12/19/2011)
Revenant (12/19/2011)
bitbucket-25253 (12/19/2011)
--Jeff Moden
Change is inevitable... Change for the better is not.
December 19, 2011 at 10:51 am
Revenant (12/19/2011)
bitbucket-25253 (12/19/2011)
. . . Being too darn lazy perfrom the necessary calculations required for rocket engine design by using my slide rule. . . .
Yes, we are...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 19, 2011 at 10:49 am
VIG (12/19/2011)
Jeff Moden (12/19/2011)
--Jeff Moden
Change is inevitable... Change for the better is not.
December 19, 2011 at 10:44 am
Just thought I'd throw these in... they get rid of the behind-the-scenes operation of parenthetical grouping and remove one extra subtraction (for the month end calculation) for a tiny bit...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 19, 2011 at 7:22 am
VIG (12/18/2011)
declare @y intdeclare @m int
select @y=2012,@m=2
select dateadd(month,(@y-1900)*12+@m,0)-1
Because there's no string conversions in that, that's one of the fastest was to do this... nicely done.
--Jeff Moden
Change is inevitable... Change for the better is not.
December 19, 2011 at 7:09 am
I absolutely agree with taking ownership of a problem. However...
The problem is that "people that make it happen" frequently aren't the "people that make it happen right". The...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 17, 2011 at 11:13 am
Koen Verbeeck (12/14/2011)
Jeff Moden (12/14/2011)
praneshram (12/14/2011)
----Last Day of Last MonthSELECT DATEADD(ms,-3,DATEADD(mm,0,DATEADD(mm,DATEDIFF(mm,0,GETDATE()),0))) 'Last Day of Last Month'
Gosh no. Always find the first day of the next month and use "less...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 17, 2011 at 8:34 am
Basically correct. Just making sure. Remember that it's also aggregating the data as it "pivots" the data.
--Jeff Moden
Change is inevitable... Change for the better is not.
December 16, 2011 at 11:02 pm
MattieNH (12/15/2011)
I had sort of realized that, and tried to implement the 'Quirky Update' running total solution referenced in that article (19 pages printed), but probably attributable to my...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 16, 2011 at 10:57 pm
Gosh... you don't need a CLR for this.
EXEC xp_DirTree 'C:\',1,1
--Jeff Moden
Change is inevitable... Change for the better is not.
December 16, 2011 at 10:50 pm
JimbobsQL (12/16/2011)
Try this for help: http://www.sqlservercentral.com/articles/Best+Practices/61537/
Sounds...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 16, 2011 at 10:47 pm
Viewing 15 posts - 31,636 through 31,650 (of 59,099 total)