Viewing 15 posts - 44,806 through 44,820 (of 59,101 total)
That's why I'll frequently use a programmable Tally CTE. I've got that bad boy written up in the Tally table article...
Thanks for the test code... I'll try to find...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 5, 2009 at 3:58 pm
I absolutely agree... right now, there's a "Rate Topic" button in the upper right quadrant of the screen... if you look at the topics in any given week, you might...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 5, 2009 at 3:55 pm
Bob Hovious (3/5/2009)
I just tested the function from that article ... it is SLOW!!!!9999 rows converted using that function takes almost 20 seconds!!!
Heh... I absolutely love it... let me officially...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 5, 2009 at 3:07 pm
Heh... well said, Bob... my opinion is, "We don' need no stinkin' ratin' system." RTFP instead. π
--Jeff Moden
Change is inevitable... Change for the better is not.
March 5, 2009 at 2:38 pm
GSquared (3/5/2009)
Number of posts doesn't assert anything, but it's a better metric than anything subjective.
Heh... Yeah... especially where I'm concerned... everyone knows I do nothing but write a couple "hunert"...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 5, 2009 at 2:35 pm
Perfect... thanks... here's how to do it...
;WITH
cteTableA AS
(
SELECT ROW_NUMBER() OVER (ORDER BY Phone_No) AS RowNumber,
Phone_No
FROM dbo.TableA
...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 5, 2009 at 2:00 pm
SQL_Quest (3/5/2009)
Jeff Moden (3/4/2009)
--Jeff Moden
Change is inevitable... Change for the better is not.
March 5, 2009 at 1:45 pm
Punketal (3/5/2009)
I solved it with some VB programming so...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 5, 2009 at 1:38 pm
souLTower (3/5/2009)
Jeff, quick question. Since I used a clustered index couldn't I "assume" that the order would be as I want it?I know to never assume...
ST
Correct... never assume unless...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 5, 2009 at 1:35 pm
Jeff Moden (3/5/2009)
Bob Hovious (3/5/2009)
select dateadd(yy,datediff(yy,0,getdate())-5,0)+ N-1
from dbo.tally
where N < datediff(dd,dateadd(yy,datediff(yy,0,getdate())-5,0),getdate())+2
Runs almost a full millisecond faster at 5-10 years....
--Jeff Moden
Change is inevitable... Change for the better is not.
March 5, 2009 at 1:33 pm
NY153 (3/5/2009)
No systables as well πAnd tables available don't have seqeunce numbers. They some id columns, but not perfect.
Very very limited access
The sys tables don't need to have any...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 5, 2009 at 1:32 pm
Bob Hovious (3/5/2009)
select dateadd(yy,datediff(yy,0,getdate())-5,0)+ N-1
from dbo.tally
where N < datediff(dd,dateadd(yy,datediff(yy,0,getdate())-5,0),getdate())+2
Runs almost a full millisecond faster at 5-10 years. π
Pretty...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 5, 2009 at 1:26 pm
KevinC. (3/5/2009)
--Jeff Moden
Change is inevitable... Change for the better is not.
March 5, 2009 at 1:24 pm
Thanks Dugi! Great way to start the day!
--Jeff Moden
Change is inevitable... Change for the better is not.
March 5, 2009 at 6:29 am
Not exactly... post the first 5 rows of one of the data files you intend to import with this and we'll show you how...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 5, 2009 at 6:24 am
Viewing 15 posts - 44,806 through 44,820 (of 59,101 total)