Viewing 15 posts - 44,806 through 44,820 (of 59,095 total)
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
NY153 (3/4/2009)
I needed for the left JOIN, so I can get...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 4, 2009 at 11:58 pm
Chirag (3/4/2009)
You cant do the Select & Update in a single query.
Ummm... I'm pretty sure you can... see Glenn's post above. That's one of the reasons I love SQL...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 4, 2009 at 11:34 pm
Heh... must be budget planning time again. This should do it, John.... I'm using Master.dbo.spt_Values as if it were a Tally table...
DECLARE @Description VARCHAR(20),
...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 4, 2009 at 11:30 pm
GSquared (3/4/2009)
--Jeff Moden
Change is inevitable... Change for the better is not.
March 4, 2009 at 11:14 pm
Punketal (3/4/2009)
That worked cheers mate...one more question, say I wanna take first and last year and skip all the ones in the middle?
Just curious... why would you need to do...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 4, 2009 at 11:12 pm
jungnaja (3/4/2009)
I personally prefer a<>b, but we have a senior programmer at work who loves not(a=b).....not(Is Null).....not(whatever). I can't just say it's difficult to debug the...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 4, 2009 at 11:09 pm
Viewing 15 posts - 44,806 through 44,820 (of 59,095 total)