Viewing 15 posts - 2,176 through 2,190 (of 4,081 total)
The most efficient in terms of CPU cycles is probably the following:
dateadd(day,datediff(day, 0,getdate()),0)
This strips hours, minutes, seconds and milliseconds from the date. Just replace GETDATE() with the name...
October 19, 2009 at 8:10 pm
Please post your code, so we can understand what you need the declare statement for. You may be able to do what you want using a user defined,...
October 19, 2009 at 8:04 pm
I'm assuming you commented the following EXEC and replaced it with the PRINT statement before sending us the code, and that in production it is uncommented.
--EXEC SP_CMDSHELL @SQL
PRINT @SQL
Remember that...
October 19, 2009 at 7:59 pm
Jack Corbett (10/19/2009)
WayneS (10/19/2009)
... banging head on desk ...The developer's head right! 😉
That would certainly be better for stress-relief, and probably for productivity too. 😛
October 19, 2009 at 7:47 pm
You are not wrapping the date columns themselves in a function, which is the usual performance killer.
Using BETWEEN with dates can be perilous, for example if you...
October 19, 2009 at 7:39 pm
WWJMD?
Jeff would probably drive the moneylenders from the temple with pork chops flung freely.
October 19, 2009 at 7:29 pm
insert into Table_Destination (Col_c)
select ISNULL(Col_A,cast(Col_B as varchar(max))
from Table_Source
-- or
insert into Table_Destination (Col_c)
select COALESCE(Col_A,cast(Col_B as varchar(max))
from Table_Source
October 19, 2009 at 7:07 pm
You're welcome. Sorry we didn't get to hear the story. 😉
October 19, 2009 at 2:03 pm
Perhaps I'm not being clear.... the point is that you have a database on each server. You aren't trying to run code across linked servers as your original...
October 19, 2009 at 9:10 am
Yes... but you still have a DB on each server, yes?
October 19, 2009 at 8:31 am
You're going to need separate copies of your code database for each server.
October 19, 2009 at 6:28 am
Where'd you get the hat? I have to make do with a colander reinforced with tin foil.
October 18, 2009 at 9:03 pm
Jeff, I thought maybe Lynn was using The Force on you to fill in for him while he was on vacation. Sort of a long-distance Jedi mind trick?
October 18, 2009 at 8:53 pm
RBarryYoung (10/18/2009)
Steve Jones - Editor (10/16/2009)
whoop upside?what's next, shocking keyboards? loud raspberries when someone responds?
Can we get that?!? :w00t:
Hey Barry.... click here. 😛
October 18, 2009 at 7:53 pm
Viewing 15 posts - 2,176 through 2,190 (of 4,081 total)