Viewing 15 posts - 6,421 through 6,435 (of 7,636 total)
I must have been focusing on these two statements:
Ideally, I wanted to find a way to have the caller that needed to run the dynamic SQL be able to catch...
June 30, 2008 at 1:29 pm
Thanks, folks. I'll try to get it done and in the queue by tonight. I'll be sure to post a link to it from here then.
June 30, 2008 at 6:30 am
Sergio SeseΓ±a (6/29/2008)
I try with my experience to answer which is the more powerful language.
Experience: I have programmed in C# as long as it has existed (about 8 years,...
June 29, 2008 at 8:14 pm
Jeff Moden (6/29/2008)
Actually, no Order By is really necessary except to satisfy the syntactical requirements of Row_Number()...
Hmmm, ... for some reason I'm not scanning it. But I'll take your...
June 29, 2008 at 7:34 pm
Jeffrey Williams (6/29/2008)And since TOP in SQL Server 2005 can use an expression, you can get rid of @Days completely.
Yeah, I knew that, but I wanted @Days because it makes...
June 29, 2008 at 7:24 pm
Jeff Moden (6/29/2008)
... and, come to think of it... I think 1 Order By in the CTE will probably be enough, as well. π
I'll need some convincing on that one....
June 29, 2008 at 5:43 pm
Jeff Moden (6/29/2008)
Much better... now, with the TOP in the CTE, do you really need the WHERE clause?
Prolly not...
June 29, 2008 at 5:37 pm
Jeff Moden (6/29/2008)
rbarryyoung (6/29/2008)
Any of this cow left for me? πHere is my entry (really just a tweak of Jeff's):
Nicely done, Barry... but I get numbers just a bit...
June 29, 2008 at 5:20 pm
One of the easier ways that you can do this is to write your own "wrapper" Proc for EXEC(string) (or for sp_ExecuteSQL), and then always have your Dynamic SQL call...
June 29, 2008 at 5:10 pm
Kimberly.Hahn (6/29/2008)
June 29, 2008 at 4:56 pm
Ack! Yeah, that does make sense...
OK, then this one runs in under a second:
Create table Dates(D datetime primary key clustered)
GO
Declare @FirstDate datetime
Declare @LastDate datetime
Declare @Days int
Set @FirstDate = Cast('1970-01-01'...
June 29, 2008 at 1:24 pm
Hey, did you get a chance to look at that draft yet?
June 29, 2008 at 1:06 pm
Any of this cow left for me? π
Here is my entry (really just a tweak of Jeff's):
PRINT REPLICATE('=',100) ---------------------------------------------------------
DBCC FREEPROCCACHE
DBCC DROPCLEANBUFFERS
declare @root int
select @root = sqrt(@testsize)+1
PRINT '===== RBarryYoung''s Method'
SET...
June 29, 2008 at 1:05 pm
I just registered! I will definitely be there...
June 29, 2008 at 12:16 pm
Viewing 15 posts - 6,421 through 6,435 (of 7,636 total)