Viewing 15 posts - 2,176 through 2,190 (of 4,080 total)
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,...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
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...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
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. 😛
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
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...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
October 19, 2009 at 7:39 pm
WWJMD?
Jeff would probably drive the moneylenders from the temple with pork chops flung freely.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
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
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
October 19, 2009 at 7:07 pm
You're welcome. Sorry we didn't get to hear the story. 😉
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
October 19, 2009 at 2:03 pm
Sounds great 🙂
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
October 19, 2009 at 11:41 am
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...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
October 19, 2009 at 9:10 am
Yes... but you still have a DB on each server, yes?
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
October 19, 2009 at 8:31 am
You're going to need separate copies of your code database for each server.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
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.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
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?
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
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. 😛
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
October 18, 2009 at 7:53 pm
Trudye, I tried to give you a hint that you were casting the result. This will work with your current column which is in numeric format. ...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
October 18, 2009 at 7:46 pm
Viewing 15 posts - 2,176 through 2,190 (of 4,080 total)