Viewing 15 posts - 47,221 through 47,235 (of 59,095 total)
There's a really, really simple way to get simple returns from a query to look great... lookup sp_MakeWebTask. With a little effort, you can also turn out some absolutely...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 14, 2008 at 6:43 pm
If the only purpose is to find "gaps" in sequential numbers, I've not found anything faster than the following... first, a little bit of test data...
--===== Create and populate a...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 14, 2008 at 6:12 pm
ang (11/14/2008)
DECLARE @ServerName nvarchar(30)
DECLARE @sql nvarchar(100)
select @ServerName = '[server-a\testdb]'
set @sql = @servername + '.master.dbo.xp_fixeddrives'
exec(@sql)
Thank you...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 14, 2008 at 5:01 pm
Got it... thanks, Clint.
--Jeff Moden
Change is inevitable... Change for the better is not.
November 14, 2008 at 4:57 pm
Lynn Pettis (11/14/2008)
Hang on!! How can I get in on this and sell tickets?? I'll even give 75% of the proceeds to SSC!
Heh... you won't have 75% left because I'm...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 14, 2008 at 4:42 pm
Lynn Pettis (11/14/2008)
Just gotta know, has anyone every called you an anti-rbar fanatic? This seems to be the main area you really become "excited" about. And NOT that...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 14, 2008 at 4:41 pm
K. Brian Kelley (11/14/2008)
--Jeff Moden
Change is inevitable... Change for the better is not.
November 14, 2008 at 3:52 pm
Heh... sorry... wrong graphic... SQL Server 2k5 won't even show the ACTUAL execution plan for anything inside a WHILE loop and the estimated execution plan shows everything with a cost...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 14, 2008 at 2:36 pm
Oh yeah... here's the proof that the Actual Execution Plan for the WHILE loop contains costs for only 1 row or, in this case, one character... that's what the wicked...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 14, 2008 at 2:26 pm
Also, I never suggested making a Tally table on the fly... a permanent Tally table is really the way to go, in most cases. Exception to that rule is...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 14, 2008 at 2:18 pm
Ok... here's the code I used to compare the WHILE loop solution you came up with against the Tally table version I posted. I had to increase the size...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 14, 2008 at 1:59 pm
Just to be sure, you're calling the WHILE loop the "procedural" code, right? If you're giving the "win" to the WHILE loop based on what you found in the...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 14, 2008 at 1:15 pm
Heh... you don't actually believe the costs in the execution plan, do you? The execution plan for WHILE loops and other forms of RBAR are only for the FIRST...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 14, 2008 at 1:01 pm
I believe I'd put a default of ' ' on the nullable column... that way, if an explicit NULL is inserted on the column, it will be NULL... if the...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 14, 2008 at 11:55 am
BWAA-HAAA! CBAC would work! Maybe "Character Reading And Processing" fits better. 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
November 14, 2008 at 11:48 am
Viewing 15 posts - 47,221 through 47,235 (of 59,095 total)