Viewing 15 posts - 44,776 through 44,790 (of 59,063 total)
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...
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....
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...
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...
March 5, 2009 at 1:26 pm
KevinC. (3/5/2009)
March 5, 2009 at 1:24 pm
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...
March 5, 2009 at 6:24 am
NY153 (3/4/2009)
I needed for the left JOIN, so I can get...
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...
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),
...
March 4, 2009 at 11:30 pm
GSquared (3/4/2009)
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...
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...
March 4, 2009 at 11:09 pm
Heh... it's easy and I'll tell you... right after you tell me why you'd want to do such a thing... you know... what are the business requirements that require this...
March 4, 2009 at 10:52 pm
bicky1980 (3/4/2009)
Is anyone able to send me an example of a Format file to be used in conjuction with the BCP command to create a comma delimited text file which...
March 4, 2009 at 10:47 pm
Viewing 15 posts - 44,776 through 44,790 (of 59,063 total)